Equivalence Between Priority Queues and Sorting