Question 2

Design a data structure which could perform the following operations in O(1):

– Insert(), Delete(), Search(), getRandom()

getRandom() should pick a “random” element from your data structure, and should not be predictable (for instance always picking the “first” element from your DS).

New Report

Close