Skip to content

briwilcox/algos

Repository files navigation

Algorithms

Reviewing algorithms, learning go. Images from wikipedia.

Search

  • Binary Search

Binary search

Sorting

Exchange Sorts:

  • Bubble Sort

Bubble Sort

  • Odd Even Sort

Odd - Even Sort

  • Quicksort

Quick Sort

Selection Sorts

  • Selection Sort

Selection Sort

Insertion Sorts

  • Insertion Sort

Insertion Sort

Merge Sorts

  • Merge Sort

Merge Sort

Primality

  • Naive Primality

  • Sieve of Eratosthenes

Sieve of Eratosthenes

Graphs

Trees

Binary trees

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

Binary Trees

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]

Releases

No releases published

Packages

No packages published

Languages