there is no discussion about space complexity why ?
What if we store our elements in heap data structure?