GTSort(A) B = A while not ordered(B) B = permute(A)

How many permutations?

Worst case analysis

- Each call to
`ordered(B)`takes - Each call to
`permute(A)`takes - while loop executed
? n! - I.e., array not sorted until last permutation

Insertion Sort (worst case):

Merge Sort (worst case):