**The sorting problem:** Given a sequence
*A*_{1}, * A*_{2} ,..., * A*_{n} of integers,
find the sorted sequence *B*_{1},* B*_{2} ,..., *B*_{n}
consisting of the same set of integers ordered so that:

*B*_{1} **<***B*_{2} __ <__
...

We develop a simple algorithm called

**Stage 2:** Repeat stage 1, reducing the length of the list by one element each time through, until the length of the new list is exactly 1.

** Identify the elements of problem solving in this algorithm

CS1104 Main Page

Last Updated 2002/02/01

© L.Heath, 2000, upgraded by J.A.N. Lee on above date.