Question: 6. Design a data structure that has the following properties: - Find median takes O(1) time - Extract-Median takes O(logn) time - Insert takes O(logn)

6. Design a data structure that has the following properties: - Find median takes O(1) time - Extract-Median takes O(logn) time - Insert takes O(logn) time - Delete takes O(logn) time where n is the number of elements in your data structure. Describe how your data structure will work and provide algorithms for all aforementioned operations. You are not required to prove the correctness of your algorithm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
