Write a function to rank (in a separate array) a set of n integer scores from low to high. For instance, array[order[0]] should contain the smallest value.
Im currently stuck at trying to sort this array because it keeps looping the smallest two numbers in the array. Is there a way to tell the program to skip the previous found smallest number or tell it to skip the number if it is smaller than the previous for loop run?
There are many sorting algorithms out there, but I think making one yourself if much more fun. One question, what is walker? That's not any term I'd use...
Now, when developing an algorithm of any sort, I think it's best to just sit down and think about and write down how it is supposed to work before even touching a computer. Another thing that helps when your program doesn't do what you'd like, is to write down the value of each variable through each loop. I found I find most of my mistakes this way.
Walker is a term used in the book I'm reading for programming, i guess its his interpretation of literately walking down an array while testing it against a point you set as an index. Thanks for the advice, think ill get some pen and paper out. ;p
It may sound silly at first, I know it did for me. But it works. If you have any trouble, feel free to ask or even look up the various sorting algorithms out there for a point in the right direction.