일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- Python Code
- Class
- 715. Range Module
- Protocol
- Python
- Substring with Concatenation of All Words
- kaggle
- Regular Expression
- shiba
- t1
- Python Implementation
- 밴픽
- 315. Count of Smaller Numbers After Self
- 43. Multiply Strings
- 109. Convert Sorted List to Binary Search Tree
- 컴퓨터의 구조
- data science
- iterator
- 파이썬
- Generator
- 운영체제
- LeetCode
- 시바견
- 30. Substring with Concatenation of All Words
- attribute
- concurrency
- Convert Sorted List to Binary Search Tree
- Decorator
- DWG
- 프로그래머스
Archives
- Today
- Total
목록First Missing Positive (1)
Scribbling
LeetCode: 41. First Missing Positive
The essence of solving this problem within O(N) time complexity & O(1) memory is using the nums array itself as the hash for its numbers. That is, nums[i] should contain the information about whether i-1 is in nums or not. Here, we should come up with an algorithm that marks nums array without messing up with the original value of nums[i]. Here, I accomplish such an algorithm using negative sign..
Computer Science/Coding Test
2021. 9. 8. 16:07