Partition always yields subarrays of size n-1 and 1.

T(n) = T(n-1) +

The ith term is T(n-i) and the boundary case is i=n-1. The summation is

We know that . Thus summation is then .

Note that Insertion Sort is O(n) in this same case (already sorted).