KBD

Keith Devens .com

Saturday, August 30, 2008 Flag waving
I would rather be an optimist and be wrong than a pessimist who proves to be right. The former sometimes... – "Hoots"
← 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)
:

August 2008
SunMonTueWedThuFriSat
 12
3456789
10111213141516
17181920212223
24252627282930
31 



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

Recent comments XML

new⇒Johnny Walker Blue Label

Wow, thanks for the scotch review​:D

Lagavulin and Laphroaig are​some of...

Keith: Aug 29, 3:35pm

Girls, please don't get breast implants

Wow, After all this time, the​comments on this page continue to​grow. It wa...

Ajeet: Aug 25, 2:36am

Generated in about 0.182s.

(Used 8 db queries)

mobile phone