일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- DWG
- Python Code
- 30. Substring with Concatenation of All Words
- data science
- 밴픽
- Convert Sorted List to Binary Search Tree
- Decorator
- attribute
- Class
- kaggle
- 43. Multiply Strings
- 시바견
- 715. Range Module
- 파이썬
- Regular Expression
- Substring with Concatenation of All Words
- Python Implementation
- shiba
- Generator
- t1
- 109. Convert Sorted List to Binary Search Tree
- 운영체제
- Protocol
- 컴퓨터의 구조
- LeetCode
- iterator
- concurrency
- 315. Count of Smaller Numbers After Self
- 프로그래머스
- Python
Archives
- Today
- Total
목록Remove Duplicates from Sorted Array II (1)
Scribbling
LeetCode: 80. Remove Duplicates from Sorted Array II
class Solution: def removeDuplicates(self, nums: List[int]) -> int: reg, freq = None, None k = 0 for i, num in enumerate(nums): # update reg & freq if reg != num: reg = num freq = 1 else: freq += 1 if freq
Computer Science/Coding Test
2021. 10. 6. 14:26