Processing+-+Sorting

Have you ever entered tried looking for a file in your computer and needed to sort your files? Ever wondered how your computer could do that so fast?

Sorting is a problem that has been discussed an explored for as long as computers have been around. Could you write an algorithm (a simple program) to sort a set of numbers that are out of order?

Try it!
 * 1) Create an array with 20 numbers in it, out of order. You can pick the numbers to start. (Don’t use a pattern to fill the array, and don’t use random numbers at the beginning.)
 * 2) Write a program to sort the numbers and put them back into the array. You may use loops or functions, but your code must work with any array (and it should be able to work on any sized array).

Let Miss Hines know when you have completed this – we will look at some of the standard algorithms that are used for sorting together as a class.

Feel free to move on and work on Recursion!