Interview Questions
Interview Guides
Experiences
Explore
Get started
Sign in
Interview Guides
All questions
/
Coding
O(1) Insert Delete GetRandom
Medium
Asked at 1 company
Hash Tables
Arrays
Data Structures
Problem
Design a data structure that supports insert, delete, and getRandom operations in O(1) time.
Question
Answer
Problem
Design a data structure that supports insert, delete, and getRandom operations in O(1) time.
Your answer
Edit
Preview
Try one AI text evaluation on us
Get structured feedback, scored against a 4-axis rubric. Premium unlocks unlimited.
0 words
target ~200
Try a free preview
Stuck? Get a hint
Past attempts
Up next
O(1) Insert Delete GetRandom
Medium
O(1) Randomized Set
Medium
O(1) Insert Delete Get-Random
Medium
Next question
O(1) Insert Delete GetRandom | Dataford Interview Questions