Computer Science Canada Inserted Sort :/ |
Author: | Flikerator [ Thu Nov 17, 2005 5:46 pm ] | ||
Post subject: | Inserted Sort :/ | ||
I have a mind block. This is inserted sort :/ It goes from itself to the end of the array looking for a smaller number. and then it "inserts" itself by moving all the numbers from that number over (The number next to it is put into its place) and that number is placed in the spot where the smallest number was (its over one place remember?). I know im doing something stupid and simple wrong. Any ideas? (It has to do with the move proc) |
Author: | Paul [ Thu Nov 17, 2005 11:36 pm ] | ||
Post subject: | |||
are you talking about insertion sort? if so this pseudocode may help you:
|
Author: | Flikerator [ Mon Nov 21, 2005 8:47 am ] | ||
Post subject: | |||
Yes it was insertion, but I figured it out last week (after I sent here).
This is the core of what I have to test and make sure it works. Now onto shell sort ![]() |