= 1 to n // O(n) • cut piece i to length li // choosing suitable units of measurement • pick up the n pieces // O(1) • and bang them down on the table • for i = 1 to n // O(n) • remove the tallest remaining piece, and measure it • the recorded sequence of measurements = the sorted list