sort is a sorting algorithm that treats the input as two parts, a sorted part and an unsorted part, and repeatedly picks the proper next value to move from the unsorted part to the end of the sorted part.