logoalt Hacker News

dhooperyesterday at 6:46 PM1 replyview on HN

Author here. Binary heaps and linked lists are different use cases. A binary heap must read the data you put in it to store it correctly, but a linked list doesn't. If I were writing a generic binary heap, maybe I would weigh my options differently. I mentioned this in the footnotes.


Replies

wordglyphyesterday at 9:45 PM

And that's why I like C++ templates