For program 3, implement heapsort. You'll need to write your own heapify routines (they're all in the book). Make sure you index your heap from zero, and use the fast (amortized linear time) build_heap function.

Input and output will be slightly different from the prior two assignments. The data will be ordered in PAIRS of integers. The first integer is the student ID number (think in terms of the Binghamton B-number). The second integer is the social security number. You will print out the students ordered by their B number. For example

53 123456789
22 987654321
37 555555555
44 666666666

should be sorted using heapsort, and printed as

22 987654321
37 555555555
44 666666666
53 123456789

Do not print out any other information, or pause on the output, and so on. I'll be checking the results against the output of my code, and if you print anything extra, it makes checking much more difficult.