A aerialsprite New Member Joined Oct 30, 2003 Messages 19 Oct 30, 2003 #1 Does anyone know a good insertion sort algorithm? I can't seem to figure out the one in the textbook...
Does anyone know a good insertion sort algorithm? I can't seem to figure out the one in the textbook...
S SamD Member Joined Jul 21, 2002 Messages 256 Gender Male HSC N/A Oct 30, 2003 #2 Here's my simple one: Code: BEGIN WHILE More items to insert Find where the current item should go Make a space for it Shove the item in the space ENDWHILE END If asked in the HSC, you'd get some marks for this but obviously a bit more detail would be needed. Are you using my text? I suspect not. You can download Ch4 for free from www.pedc.com.au which has more detail on this stuff. HTH Sam Last edited: Oct 30, 2003
Here's my simple one: Code: BEGIN WHILE More items to insert Find where the current item should go Make a space for it Shove the item in the space ENDWHILE END If asked in the HSC, you'd get some marks for this but obviously a bit more detail would be needed. Are you using my text? I suspect not. You can download Ch4 for free from www.pedc.com.au which has more detail on this stuff. HTH Sam
A aerialsprite New Member Joined Oct 30, 2003 Messages 19 Oct 30, 2003 #3 thanks, the thing is i couldn't figure out the more detailed one in your text.... :S
L leeraff Member Joined Sep 11, 2003 Messages 63 Gender Male HSC 2004 Nov 1, 2003 #4 look at these two web sites. this one is good for the theory http://courses.cs.vt.edu/~csonline/ this one has good activities as well as an algorithm http://hsc.csu.edu.au/sdd/core/cycle/
look at these two web sites. this one is good for the theory http://courses.cs.vt.edu/~csonline/ this one has good activities as well as an algorithm http://hsc.csu.edu.au/sdd/core/cycle/