Reviewing algorithms, learning go. Images from wikipedia.
- Binary Search
- Bubble Sort
- Odd Even Sort
- Quicksort
- Selection Sort
- Insertion Sort
- Merge Sort
-
Naive Primality
-
Sieve of Eratosthenes
Creation, insertion, searching, and simultaneously searching via go routines. Taken from golang.org
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
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]