Skip to content

smblott-github/bogo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bogosort Visualiser

Sam McElligott - https://github.com/sammce

This Python (3) program shows the blazingly slow performance of bogosort.

Installation

Clone the repo:

git clone https://github.com/sammce/bogo.git

cd into the repo directory:

cd bogo

Setup a Python virtual environment (optional, but recommended):

python3 -m venv venv

Activate the virtual environment (only if you did the last step):

source venv/bin/activate

Install dependencies listed in requirements.txt: The only package this program relies on is samutil, written by yours truly.

python3 -m pip install -r requirements.txt

You can now run the program via:

python3 bogo.py

Configuration

The following table shows the configurable constants at the top of bogo.py and what they're for:

Name Purpose Default Type
LIST_LENGTH The length of the list being sorted by bogo 4 int
ITERATIONS How many passes the program should do 20 int
BAR_CHART_DELAY The delay, in seconds, between each chart render 0.1 float
BAR_CHART_CHAR The string to use when representing the lists items "bogo" str

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%