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

https://github.com/briwilcox/algos

Learning go through algorithms
https://github.com/briwilcox/algos

binary-trees bubble-sort insertion-sort quicksort selection-sort

Last synced: 27 days ago
JSON representation

Learning go through algorithms

Awesome Lists containing this project

README

          

# Algorithms
Reviewing algorithms, learning go. Images from wikipedia.

## Search
* Binary Search

![Binary search](https://upload.wikimedia.org/wikipedia/commons/f/f7/Binary_search_into_array.png)

## Sorting

### Exchange Sorts:
* Bubble Sort

![Bubble Sort](https://upload.wikimedia.org/wikipedia/commons/3/37/Bubble_sort_animation.gif)
* Odd Even Sort

![Odd - Even Sort](https://upload.wikimedia.org/wikipedia/commons/1/1b/Odd_even_sort_animation.gif)
* Quicksort

![Quick Sort](https://upload.wikimedia.org/wikipedia/commons/6/6a/Sorting_quicksort_anim.gif)

### Selection Sorts
* Selection Sort

![Selection Sort](https://upload.wikimedia.org/wikipedia/commons/b/b0/Selection_sort_animation.gif)

### Insertion Sorts
* Insertion Sort

![Insertion Sort](https://upload.wikimedia.org/wikipedia/commons/2/25/Insertion_sort_animation.gif)

### Merge Sorts
* Merge Sort

![Merge Sort](https://upload.wikimedia.org/wikipedia/commons/c/c5/Merge_sort_animation2.gif)

## Primality

* Naive Primality

* Sieve of Eratosthenes

![Sieve of Eratosthenes](https://upload.wikimedia.org/wikipedia/commons/b/b9/Sieve_of_Eratosthenes_animation.gif)

## Graphs

### Trees

#### Binary trees

Creation, insertion, searching, and simultaneously searching via go routines. Taken from golang.org

![Binary Trees](https://upload.wikimedia.org/wikipedia/commons/b/bb/Binary_tree_traversion.svg)

# Outputs

## Search

### Binary Search

Binary Search:
* Search Space: [0 1 2 3 4 5 6 7 8 9]
* a[ 9 ] = 9

Binary Search:
* Search Space: [0 1 2 3 4 5 6 7 8 9]
* a[ 2 ] = 2

Binary Search:
* Search Space: [0 1 2 3 4 5 6 7 8 9]
* 15 was not found

Binary Search:
* Search Space: [0 1 2 3 4 5 6 7 8 9]
* a[ 5 ] = 5

Binary Search:
* Search Space: [0 1 2 3 4 5 6 7 8 9]
* 10 was not found

## Sort

### Quicksort

Unsorted:
* [9 8 7 6 5 4 3 2 1 0]

Sorted via Quicksort:
* [0 1 2 3 4 5 6 7 8 9]

Unsorted:
* [0 9 3 5 4 1 6 7 8 2]

Sorted via Quicksort:
* [0 1 2 3 4 5 6 7 8 9]