LeetCode/Top150Interview/380InsertDeleteGetRandomO1.py

31 lines
473 B
Python

def __init__(self):
def insert(self, val):
"""
:type val: int
:rtype: bool
"""
return True
def remove(self, val):
"""
:type val: int
:rtype: bool
"""
return False
def getRandom(self):
"""
:rtype: int
"""
return getRandom
# Your RandomizedSet object will be instantiated and called as such:
# obj = RandomizedSet()
# param_1 = obj.insert(val)
# param_2 = obj.remove(val)
# param_3 = obj.getRandom()