stripe1 LeetCode 41. First Missing Positive Problem: Given an unsorted integer array, find the smallest missing positive integer. Example 1: Input: [1,2,0] Output: 3 Example 2: Input: [3,4,-1,1] Output: 2 Example 3: Input: [7,8,9,11,12] Output: 1 -Summary- 1. Set first positive integer as 1 --> posNum 2. loop-through the nums and check if posNum is in the nums list. (max int: 2^31 -1) - if there is, adding 1 more value to posNum and find .. 2020. 6. 18. 이전 1 다음