일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 715. Range Module
- 30. Substring with Concatenation of All Words
- Class
- Decorator
- 43. Multiply Strings
- Python Implementation
- concurrency
- kaggle
- t1
- Generator
- Protocol
- Substring with Concatenation of All Words
- 파이썬
- 315. Count of Smaller Numbers After Self
- 운영체제
- iterator
- 프로그래머스
- 109. Convert Sorted List to Binary Search Tree
- Python
- data science
- LeetCode
- Convert Sorted List to Binary Search Tree
- Regular Expression
- 밴픽
- Python Code
- DWG
- shiba
- attribute
- 시바견
- 컴퓨터의 구조
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