leetcode.com/problems/first-bad-version/ First Bad Version - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 마지막 상품이 품질 체크에 실패했다. 이전 버전에 기반해 새로 개발되기 때문에 실패한 버전 이후로 나온 모든 버전은 동작하지않는다. n개의 버전이 있다고 가정하고 첫번째 실패한 버전을 찾아라. bool isBadVersion()이라는 실패한 버전인지 아닌지 확인 할 수 있는 api가 제공된다. api 호..
leetcode.com/problems/intersection-of-two-arrays-ii/ Intersection of Two Arrays II - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 num1, num2 숫자 배열이 주어진다. 교집합인 요소들의 배열을 리턴하라. 어떻게 풀까 for문 두개를 사용해 문제를 풀었다. 하지만 이렇게 푸는게 좋지않은듯.. 구현 class Solution { public int[] intersect(int[] nums..
leetcode.com/problems/intersection-of-two-arrays/ Intersection of Two Arrays - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 num1과 num2 정수 배열이 주어진다. 교집합인 요소들의 배열을 구하시오. (순서는 상관없으며, 결과의 각 요소는 유니크하다.) 어떻게 풀까 Set의 retainAll이라는 교집합 함수를 사용한다. 구현 import java.util.*; class Solution {..
leetcode.com/problems/two-sum-ii-input-array-is-sorted/ Two Sum II - Input array is sorted - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 오름차순의 정수 배열이 주어진다. 합해서 target 숫자가 되는 두개의 숫자를 찾아서 인덱스를 리턴해라. 단, 항상 하나의 답이 있으며 같은 인덱스를 두번 더해선 안된다. 어떻게 풀까 for문 두개를 사용한다. 첫번째 포문 안에선 순서대로 val..
leetcode.com/problems/search-insert-position/ Search Insert Position - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 독립된 정수가 들어있는 정렬된 배열과 타겟 값이 주어진다. 배열에서 타겟 값의 인덱스를 구하시오. 없다면 들어갈때 있어야하는 인덱스를 리턴하시오. 어떻게 풀까 binary search 방식을 사용하자 leftIdx와 rightIdx를 사용하여 middleIdx를 구하고 타겟 값으로 향하..
leetcode.com/problems/word-pattern/ Word Pattern - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 문자열과 패턴이 주어졌을 때 패턴과 일치하는 문자열이면 true를 리턴 Ex) Input: pattern = "abba", s = "dog cat cat dog" Output: true 어떻게 풀까 ' '를 기준으로 split을 하여 문자열을 나눈다. Pattern을 포문돌리며 character 를 한개씩 읽는다. 캐릭터..
leetcode.com/problems/count-primes/ Count Primes - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 n보다 작은 수 중에서 소수의 개수를 구하시오 소수 : 1보다 큰 자연수 중 1과 자기 자신만을 약수로 가지는 수 ex) 5 => 1×5 또는 5×1로 수를 곱한 결과를 적는 유일한 방법이 그 수 자신을 포함하기 때문에 5는 소수 어떻게 풀까 에라토스테네스의 체라는 소수판별 알고리즘을 사용해 문제를 풀자 1. 2부터 소수..
leetcode.com/problems/average-salary-excluding-the-minimum-and-maximum-salary/ Average Salary Excluding the Minimum and Maximum Salary - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 salary배열로 전달 받은 연봉데이터의 평균을 구하시오 (단, 최소와 최대연봉은 제외) 어떻게 풀까 sort를 하고 최소와 최대를 빼고 전부 더한다. return 더한..
- Total
- Today
- Yesterday
- leetcode 204
- leetcode 278
- gradle빌드
- xmlpullparserexceptioin
- 2447
- 별찍기-10
- binarySearch
- 언제까지할수있을까
- 티스토리코드작성
- leetcode 350
- Docker
- elastic ip
- leetcode 69
- binary search
- LeetCode
- 도커
- webhook
- 백준
- leetcode 167
- 릿코드
- Leetcode717
- 1491
- ngrok
- 뒤늦은 1년 후기
- leetcode 349
- leetcode 35
- Jenkins
- java
- Github
- config.xml
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |