Design a Data Structure with following operations
1.Insert(X) -> insert X if X not present
2.Delete(X) -> delete X if X present
3.Get() -> return any element if it is present
all operations in O(1).
No memory constraint.
Use an array, which has size equal to the maximum size of the key
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment