Design a data structure that has the following properties :
We can design the data structure using two heaps - one \( max \) heap and one \( min \) heap.
In either case, median can be found in constant time. public static int FindMedian(){ |