โ† Oracle questions
CodingReported in a candidate post, May 2025

Insert, Delete, GetRandom in O(1)

Filed under Oracle

Design a data structure supporting insert(val), remove(val) and getRandom() (return a uniformly random existing element), each in average O(1) time.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Oracle questions

Collected from public candidate posts and coding forums. Updated Nov 2026.