KBD

Keith Devens .com

Thursday, May 17, 2012 Flag waving
The most profound engine of civilization is the inability of a larger and larger fraction of the population to do... – Theodore Gray
← 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)
:

May 2012
SunMonTueWedThuFriSat
 12345
6789101112
13141516171819
20212223242526
2728293031 



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

Recent comments XML

new⇒Acknowledging the Arrival of Peak Government

In many ways, Peak Oil is​responsible for this new​uselessness of the big g...

Revence: May 16, 6:35am

new⇒Tab EXSPLOSION

Right now, I, too, have too many​tabs open. A rough count says​25.
Right. ...

Revence: May 16, 6:21am

George W. Bush: ‘I’m for Mitt Romney’ - ABC News

A marked difference (departure,​even) from the KBD of eight--yea,​even four...

Revence: May 15, 1:55pm

WebOb — WSGI request and response objects

Google App Engine forces one to​learn these....

Revence: May 15, 1:52pm

Generated in about 0.205s.

(Used 8 db queries)