It is just an algorithm I am giving ...

Way 1.construct a heap ...

Delete "I" elements and return the I'th element for I'th minimum/largest number without sorting,

way 2.you can also construct trees( AVL ,red-black,2-4) ...

Inorder traversel of the tree gives sorted numbers ...

Logically it is not done by SORTING the elements ... ;)

order is n(log(n))

Way 1.construct a heap ...

Delete "I" elements and return the I'th element for I'th minimum/largest number without sorting,

way 2.you can also construct trees( AVL ,red-black,2-4) ...

Inorder traversel of the tree gives sorted numbers ...

Logically it is not done by SORTING the elements ... ;)

order is n(log(n))