I'm trying to solve probelm which states: make data structure which supports:
1) Add element with key k
2) Delete element with key k
3) Print kth largest element in data structure
I thought that maxheap should work, but in this case we need to delete first k-1 largest value from heap to get the kth maximum element, so it won't work here.
How I can solve this ?