With Lemma 6, ROTATED SORT can be done in P n i=1(2li1+1 l ) operations; we know that to minimize the sorting cost, l should be chosen to minimize 2ln1 l . We can always choose the perfect l but make the cost amortized, by performing normalization that takes O(n) operations whenever the array grows until l is not optimal. A perfectly sorted array can be visualized as an l-levels rotated list, regardless of l. We can maintain the optimal value of l by normalization, with the amortized constant cost. Therefore, the overall sorting cost can remain the same.