An open API service indexing awesome lists of open source software.

https://github.com/invzhi/sorting-visualization

:art: A command-line tool to generate GIF which can display sorting algorithm
https://github.com/invzhi/sorting-visualization

algorithm gif golang sort visualization

Last synced: 5 days ago
JSON representation

:art: A command-line tool to generate GIF which can display sorting algorithm

Awesome Lists containing this project

README

          

# sorting-visualization

[![GoDoc](https://godoc.org/github.com/invzhi/sorting-visualization?status.svg)](https://godoc.org/github.com/invzhi/sorting-visualization)
[![Go Report Card](https://goreportcard.com/badge/github.com/invzhi/sorting-visualization)](https://goreportcard.com/report/github.com/invzhi/sorting-visualization)
[![license](https://img.shields.io/github/license/invzhi/sorting-visualization.svg)](LICENSE)

Inspired by [FishyMcFishFace](https://imgur.com/t/rainbow/RM3wl) on [Hacker News](https://news.ycombinator.com/item?id=15423202).

More:

- [Sorting Algorithms Visualized](https://imgur.com/a/voutF)
- [Sorting Algorithms Revisualized](https://imgur.com/gallery/GD5gi)
- [How I Visualized Sorting Algorithms and Brought Them to Life with Sound
](https://medium.freecodecamp.org/how-i-visualized-the-sorting-algorithms-and-brought-them-to-life-with-sound-ce7c5c6cb6ef)

## Usage
```
Usage of ./sorting-visualization:
-delay int
successive delay times, one per frame, in 100ths of a second (default 10)
-filename string
GIF's filename (default: sorting name)
-height int
GIF's height (default 256)
-sorting string
selection, insertion, shell, merge, quick, bubble, radix, all
-weight int
GIF's weight (default 256)
```

## GIFs

### Selection Sort
![Selection Sort GIF](gifs/selection.gif)

### Bubble Sort
![Bubble Sort GIF](gifs/bubble.gif)

### Insertion Sort
![Insertion Sort GIF](gifs/insertion.gif)

### Shell Sort
![Shell Sort GIF](gifs/shell.gif)

### Merge Sort
![Merge Sort GIF](gifs/merge.gif)

### Quick Sort
![Quick Sort GIF](gifs/quick.gif)

### Heap Sort
![Heap Sort GIF](gifs/heap.gif)

### Radix Sort
![Radix Sort GIF](gifs/radix.gif)