![]() |
![]()
| ![]() |
![]()
NAMEbogosort - sorts or doesn't sort files or standard inputSYNOPSISbogosort [options] [files]DESCRIPTIONbogosort sorts files or its standard input using the bogo-sort algorithm. (I won't even bother to dream up some bogus advantages here.)If any files are given input is taken from files in stead of standard input. It can also just randomise the lines in its input, allowing you to perform your own check in a loop. OPTIONSbogosort accepts the following options:
JARGON FILE ENTRYThe following section is taken from the Jargon File....The archetypical perversely awful algorithm (as opposed to bubble sort, which is merely the generic bad algorithm). Bogo-sort is equivalent to repeatedly throwing a deck of cards in the air, picking them up at random, and then testing whether they are in order. It serves as a sort of canonical example of awfulness. Looking at a program and seeing a dumb algorithm, one might say “Oh, I see, this program uses bogo-sort.” Esp. appropriate for algorithms with factorial or super-exponential running time in the average case and probabilistically infinite worst-case running time. Compare bogus, brute force, lasherism... BUGSThis program is intentionally bogus.SEE ALSOsort(1), Jargon File <http://www.tuxedo.org/~esr/jargon/>.AUTHORUlrik Haugen <qha@lysator.liu.se>.
|