[LeetCode][Python3] 705. Design HashSet
2018. 9. 12. 22:17 |
프로그래밍/LeetCode
Problem :
https://leetcode.com/problems/design-hashset/description/
My Solution :
class MyHashSet:
def __init__(self):
self.hset = [False] * 1000001
def add(self, key):
self.hset[key] = True
def remove(self, key):
self.hset[key] = False
def contains(self, key):
return self.hset[key]
'프로그래밍 > LeetCode' 카테고리의 다른 글
[LeetCode][Python3] 2. Add Two Numbers (0) | 2018.09.24 |
---|---|
[LeetCode][Python3] 53. Maximum Subarray (0) | 2018.09.21 |
[LeetCode][Python3] 38. Count and Say (0) | 2018.09.21 |
[LeetCode][Python3] 665. Non-decreasing Array (0) | 2018.09.13 |
[LeetCode][Python3] 706. Design HashMap (0) | 2018.09.12 |
[LeetCode][Python3] 35. Search Insert Position (0) | 2018.09.12 |
[LeetCode][Python3] 28. Implement strStr() (0) | 2018.09.12 |
[LeetCode][Python3] 27. Remove Element (0) | 2018.09.11 |
최근에 달린 댓글 최근에 달린 댓글