Eliminate the use of PriorityQueue and just use a std::vector,