KBD

Keith Devens .com

Tuesday, March 16, 2010 Flag waving
Whereof one cannot speak, thereof one must be silent. – Ludwig Wittgenstein (Tractatus Logico-Philosophicus)
← Iwo Jima, if covered by media today, by Zell MillerHow to Study: A Brief Guide →

Daily link icon Thursday, October 14, 2004

Gnome Sort - The Simplest Sort Algorithm

Gnome Sort - The Simplest Sort Algorithm, via Dick Grune who has a lot of other interesting stuff such as his book on parsing (which I have linked to before). Incidentally, Wikipedia's pages on sorting algorithms appear to be excellent.

← Iwo Jima, if covered by media today, by Zell MillerHow to Study: A Brief Guide →

Comments XML gif

Keith Gaughan (http://talideon.com/) wrote:

Haven't you posted that up before, or am I just remembering something I did..?

∴ Keith Gaughan | 14-Oct-2004 10:38am est | http://talideon.com/ | #5865

Keith (http://keithdevens.com/) wrote:

I didn't post this before, though I'm pretty sure I first came across it a while ago on your site, actually. Since you've moved around I didn't bother looking for the original link, though maybe I broke the rules on hat tips.

Keith | 14-Oct-2004 12:23pm est | http://keithdevens.com/ | #5866

Keith Gaughan (http://talideon.com/) wrote:

No you didn't, so don't worry. It's just that the link struck me as being way too familiar.

It's a cool little algorithm. I ought to check it to see if it's generally more efficient than the other simple n^2 search algorithms like Insertion Sort. It's good to have a nice, simple algorithm that you can keep in your head for the times that the library and OS algorithms don't make any sense and you're sorting small amounts of data.

∴ Keith Gaughan | 15-Oct-2004 9:25am est | http://talideon.com/ | #5877

Keith (http://keithdevens.com/) wrote:

I ought to check it to see if it's generally more efficient than the other simple n^2 search algorithms like Insertion Sort.

If you do, let me know what results you get. A few years ago, I implemented a bubble sort in ASP because ASP (vbscript) doesn't have sorting built in. I would have been happy to use Gnome sort instead Smiley

For future reference, here are two quicksort algorithms in vbscript that I probably could have used instead assuming they existed at the time.

Keith | 15-Oct-2004 1:12pm est | http://keithdevens.com/ | #5879

Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

March 2010
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 1 posts

Recent comments XML

new⇒Quantum physics and free will

I knew you were going to say that....

Tom Massey: Mar 15, 9:26pm

Generated in about 0.098s.

(Used 8 db queries)