Solved: priority queue using min-heap