Created helper function for Remove() and Pop() in PriorityQueue.cpp