Insert Delete GetRandom O(1)
Try to solve the Insert Delete GetRandom O(1) problem.
We'll cover the following...
Statement
Implement a Random Set data structure that can perform the following operations:
- Constructor(): This initializes the Random Set object.
- Insert(): This function takes an integer, data, as its parameter and, if it
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy