Talk:Sorting algorithms/Gnome sort: Difference between revisions
Content added Content deleted
m (→C problem?: it was Huffman, not LZW!) |
|||
Line 1:
== C problem? ==
The second <code>j := j + 1</code> from the example seems to be missing? --[[User:Paddy3118|Paddy3118]] 17:04, 27 April 2009 (UTC)
: The code works for sure (I've used it in
: How I can understand it now: the previous C version was simply the ''original'' Gnome sort as explained in the Dick Grune citation on Wikipedia (the garden gnome moves always one step forward or backward); the pseudocode is an optimized version, since we don't need to pass through every pot to reach the same position we left when started to go backward; so we can restart from j instead of 1. --[[User:ShinTakezou|ShinTakezou]] 20:37, 27 April 2009 (UTC)
|