User Tools

Site Tools

Is sorted

A very simple algorithm that iterates over an array to check if it sorted. Each sequential pair of items is checked, if any two items are out of order the array is out of order. The algorithm runs in $O(n)$ time, $O(1)$ space.

λ Is_Sorted

is_sorted.txt · Last modified: 2015/02/02 08:28 (external edit)