Amdocs Interview Question

merge sort heap sort puzzle