object not itterable
This commit is contained in:
parent
10dd9d25df
commit
ce050a911a
@ -1,26 +1,36 @@
|
||||
import random as r
|
||||
|
||||
def __init__(self):
|
||||
|
||||
self.set = {}
|
||||
|
||||
def insert(self, val):
|
||||
"""
|
||||
:type val: int
|
||||
:rtype: bool
|
||||
"""
|
||||
return True
|
||||
if val is None:
|
||||
return None
|
||||
if val not in self:
|
||||
self.add(val)
|
||||
return True
|
||||
return False
|
||||
|
||||
def remove(self, val):
|
||||
"""
|
||||
:type val: int
|
||||
:rtype: bool
|
||||
"""
|
||||
return False
|
||||
if val not in self:
|
||||
return False
|
||||
self.discard(val)
|
||||
return True
|
||||
|
||||
|
||||
def getRandom(self):
|
||||
"""
|
||||
:rtype: int
|
||||
"""
|
||||
return getRandom
|
||||
return r.self
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user