We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I mean, you are using another data structure (not a heap) for that index-searching task. It's like, you could better use that data structure instead, and forget the heap. I haven't solved it with maps or sets because I want to think in a pure-heap solution, maybe two heaps or something like that? I don't know, just saying...
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
QHEAP1
You are viewing a single comment's thread. Return to all comments →
I mean, you are using another data structure (not a heap) for that index-searching task. It's like, you could better use that data structure instead, and forget the heap. I haven't solved it with maps or sets because I want to think in a pure-heap solution, maybe two heaps or something like that? I don't know, just saying...