SquareAllElementsAndKeepSortedUsingPriorityQueue