Sorting based on height complete.