CPS 49S: Jawaa Sorting

Julia Whitley & Anthony Kang



  1. Start by comparing the first two rectangles in the group, and shift the second rectangle to the left if it is smaller.
  2. Look at the next rectangle, compare with the one on its left, and shift it to the left until it is smaller than the one to its right and larger than the one to its left.
  3. Repeat step 2 until finished.