Wednesday, September 8, 2010

Algorithm

I think to best way to solve this problem is basically the reverse of what we did in class.  The algorithm would look at the first two numbers, and if the one of the right was greater than the one on the left, then it would switch them, but if the one of the right was less, it would move on to the next two numbers.  This would be a very efficient way to solving this problem.

No comments:

Post a Comment