Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 피보나치
- 알고리즘
- 그리디
- easy
- Singleton Pattern
- GKE
- BubbleSort
- golang
- go
- github
- Backjoon
- Kotlin
- cpu scheduling
- Python
- kubernetes
- Observer Pattern
- docker
- Programmers
- Dynamic Programming
- KAKAO
- k8s
- mobaXTerm
- GCP
- 백준
- LeetCode
- java
- Top-down
- 파이썬
- Codility
Archives
- Today
- Total
목록Hashtable (1)
To Be Developer
[LeetCode] 219. Contains Duplicate II (Python)
https://leetcode.com/problems/contains-duplicate-ii/ [Python 풀이] class Solution(object): def containsNearbyDuplicate(self, nums, k): """ :type nums: List[int] :type k: int :rtype: bool """ # nums가 중복이 없다면 return False if len(set(nums)) == len(nums): return False # nums 의 크기 size = len(nums) # nums 를 index와 value 를 하나하나 꺼내서 비교해본다. for i, v in enumerate(nums): # 여기서 out of range exception이 발생할 수 있..
알고리즘/LeetCode
2019. 4. 22. 16:55