graphSearchWithPriorityQueue() is modified to perform A* search