CodingReported in a candidate post, May 2024
Insert Delete GetRandom O(1) - Duplicates Allowed
Filed under Affirm
The question
Implement a data structure that supports insertion, deletion, and getting a random element in O(1) time, allowing for duplicates.
No write-up yet. Related questions below have one.
Related Affirm questions
Collected from public candidate posts and coding forums. Updated Nov 2026.