Trying Your Hand at Writingan Algorithm
Write an algorithm to sort 5 numbers from largest to smallest.
Take out a piece of paper. Tear it into 5 small pieces. Write the following numbers, one on each piece of paper: 2, 17, 33, 4, 6.
Take out a second piece of paper. Write your name on it.
Write down the steps (an algorithm) to sort these 5 numbers. Note: You can only view and compare 2 numbers at any single point in time.
(I’ll collect these at the end of class today. These won’t be graded.)