Skip to content

glesica/shotgun-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An ANSI C implementation of Shotgun Sort. The general algorithm works as such:

SGSORT(list):
    while list is not sorted:
        randomize list

Note: This should be obvious, but in case it isn't, don't actually use this 
algorithm for real work. It's time complexity is unbounded and it may never 
terminate.

Note 2: I didn't think very hard about the randomize() function, it may 
not produce orderings in a uniformly distributed manner. But really who 
cares, as long as all orderings are possible.

About

ANSI C Implementation of Shotgun Sort

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published