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).

Ask Us How You Can Get Your First Dream Job 😉

Fill in the form below to book a 30 min no-obligation consulting session.

 

New Report

Close