Design a data structure supporting insert, delete, and getRandom in average O(1) time.
Asked in the Virtual Interview stage. Similar to LeetCode 380. Implement the unique-element version using the following grading wrapper:
randomized_set_operations(operations) receives a list of operations such as ["insert", 5], ["delete", 5], and ["getRandom"]. Return each operation's result in order. getRandom is tested only when exactly one element exists, so its result is deterministic.
Reported follow-up: How would you extend this data structure to support duplicate elements?
def randomized_set_operations(operations):