Design an O(1) Insert, Delete, and GetRandom Data Structure
Design a RandomizedSet that stores unique integers and supports these operations:
put(val): Insertval. Returnfalseif it already exists; otherwise insert it and returntrue.- `delete(v...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
