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