simplest-sort

command module
v0.0.0-...-b5fe451 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 5 Imported by: 0

README

Simplest sort

Showcases the simplest sorting algorithm that works in quadratic time. From here.

The pseudocode for this algo can be seen below (sorts an array with n elements in non-decreasing order):

for i from 0 to n:
    for j from 0 to n:
        if Ar[i] < Ar[j]:
            swap(Ar[i], Ar[j])

This repository houses a go program that uses exactly this algo, but animates how it works on your terminal! Demo below:

Screencast

Usage

Assuming you have git and go installed, you can simply clone and run.

git clone https://github.com/radiantly/simplest-sort
cd simplest-sort

go run .

Should work on any modern terminal.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL