목록leetcode_hard (1)
Bunker
[hard] 41. First Missing Positive
문제 https://leetcode.com/problems/first-missing-positive/ First Missing Positive - 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 풀이 1) Merge Sort를 이용하여 리스트에 있는 숫자를 먼저 오름차순으로 정리 2) 가장 작은 수를 1로 설정하고, - 0보다 작거나 같은 element는 skip - 현재의 가장 작은 수와 동일한 element가 나올 경우, 작은 수를 +1 - 현재의 가장 작은 ..
Algorithms/Leetcode
2022. 7. 25. 21:54