Hello Everybody,

I need to design or use an existing data structure which performs extractMin, extractMax and insert efficiently. What I mean by extractMin (resp. extractMax) is to retrieve the minimum (resp. maximum) element in the data structure. I know that if I use a red-black tree or avl tree or any other balanced binary tree, each of three operations will be O(logn). I am looking for something more efficient.

Any idea?


Best,
-hkullana