Implement a custom data structure in Python that supports insertion, deletion, and retrieving a random element in O(1) time.
You are practicing as a guest. Sign up free to get your answer graded with AI feedback. Your draft stays right here.