Problem :

https://leetcode.com/problems/design-hashmap/description/


My Solution :

class MyHashMap:

def __init__(self):
self.map = [None] * 1000001

def put(self, key, value):
self.map[key] = value

def get(self, key):
item = self.map[key]
if item is None:
return -1
return item

def remove(self, key):
self.map[key] = None


Comment :

음... 이건 그냥 list랑 다를 바가 없다.