Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I was just wondering if this was possible?
Surely there maybe some naive methods of doing so, but I was just wondering if someone can suggest efficient ways to do so.
You can just ignore that you have a max heap and build your min heap from it. O(n) time
complexity. No need for additional array.
Required, but never shown