Sort the last element in the array to where it should go, assuming the rest of the array is sorted
The array of transitions