Skip to content

An incredibly inefficient sorting algorithm, badly implemented in Rust.

Notifications You must be signed in to change notification settings

lukasgabriel/bingusort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐈‍⬛ bingusort 🐈‍⬛

Bingus Build Version

An incredibly inefficient sorting algorithm, badly implemented in Rust.

My goal was to create the worst (in terms of execution time) possible algorithm that

  • is more original than bogosort - as in, not just shuffling the array,
  • would still eventually sort the list,
  • while making its implementation as fast as possible.

Engage Bingus mode with -b to make execution so slow that you can watch the program work in real time! 😎

Usage

BINGUS Sort 

USAGE:
    bingusort [OPTIONS]

OPTIONS:
    -a <array>         Input list to be sorted
    -b                 Activates BINGUS mode. Just see for yourself.
    -h, --help         Print help information
    -l <length>        Specifies length of the list
    -s <slow>          Activates slow mode, which inserts pauses between verbose outputs of
                       specified length (in ms). Does nothing when used without -v / --verbose
    -v                 Activates verbose mode

Here's what it does

  1. Bounce: Randomly select and swap elements.
  2. Inspect: Identify the largest value..
  3. Nudge: ...and laboriously shift it to the end.
  4. Glimpse: Locate the smallest value
  5. Upgrade: ...and painstakingly push it to the front.
  6. Scramble: Shuffle elements at two randomly chosen positions based on the BINGUS numerals.

If you can figure out what the time complexity of this algorithm is, let me know.

About

An incredibly inefficient sorting algorithm, badly implemented in Rust.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages