PTC interview question

Sorting algorithm and pseudo code