You are viewing a single comment's thread. Return to all comments →
you only need to build the heap from scratch if you are using a language like C. Java, C++, C#, python have a heap structure that you can use.
You have the PriorityQueue class in Java also. I don't use C++ alot but I am sure that it also has priority queue library.