https://github.com/oyvinddd/algorithms-and-data-structures
A collection of algorithms and data structures implemented in Go
https://github.com/oyvinddd/algorithms-and-data-structures
algorithms computer-science data-structures divide-and-conquer dynamic-programming golang memoization search-algorithms sort-algorithms
Last synced: 4 months ago
JSON representation
A collection of algorithms and data structures implemented in Go
- Host: GitHub
- URL: https://github.com/oyvinddd/algorithms-and-data-structures
- Owner: oyvinddd
- Created: 2019-08-04T17:24:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-25T21:03:49.000Z (over 5 years ago)
- Last Synced: 2025-06-01T07:52:19.643Z (5 months ago)
- Topics: algorithms, computer-science, data-structures, divide-and-conquer, dynamic-programming, golang, memoization, search-algorithms, sort-algorithms
- Language: Go
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Algorithms and Data Structures
==============================
A collection of algorithms and data structures implemented in [Go](https://golang.org/ "Visit golang.org")
----------------------------------------------------------------
### Algorithms
#### Sorting
* __Elementary sorts__
* [~~Linear sort~~](https://github.com/oyvinddd/algorithms/blob/master/algorithms/sorting/linearsort/linearsort.go "Go to page") - O(n)
* [Selection sort](https://github.com/oyvinddd/algorithms/blob/master/algorithms/sorting/selectionsort/selectionsort.go "Go to page") - O(n^2)
* [Insertion Sort](https://github.com/oyvinddd/algorithms/blob/master/algorithms/sorting/insertionsort/insertionsort.go "Go to page")
* [Shell sort](https://github.com/oyvinddd/algorithms/blob/master/algorithms/sorting/shellsort/shellsort.go "Go to page")
* [Mergesort](https://github.com/oyvinddd/algorithms/blob/master/algorithms/sorting/mergesort/mergesort.go "Go to page") - O(nlogn)
* [Bottom-up mergesort](https://github.com/oyvinddd/algorithms/blob/master/algorithms/sorting/mergesort/mergesortbu.go "Go to page") - O(nlogn)
* [Quicksort](https://github.com/oyvinddd/algorithms/blob/master/algorithms/sorting/quicksort/quicksort.go "Go to page") - O(nlogn)
#### Searching
* [Binary search](https://github.com/oyvinddd/algorithms/blob/master/algorithms/searching/binarysearch/binarysearch.go "Go to page") - O(logn)
* [Breadth-first search (BFS)](https://github.com/oyvinddd/algorithms/blob/master/algorithms/searching/bfs/bfs.go "Go to page") - O(e+v)
* [Depth-first search (DFS)](https://github.com/oyvinddd/algorithms/blob/master/algorithms/searching/dfs/dfs.go "Go to page") - O(e+v)
#### Greedy
* [Interval Scheduling](https://github.com/oyvinddd/algorithms/blob/master/algorithms/greedy/interval.go "Go to page")
* Dijkstra's Algorithm
* Kruskal's Algorithm
* Prim's Algorithm
#### Dynamic Programming (DP)
* [Fibonacci Sequence](https://github.com/oyvinddd/algorithms/blob/master/algorithms/dp/fibonacci.go "Go to page") - O(n)
* [Kadane's Algorithm](https://github.com/oyvinddd/algorithms/blob/master/algorithms/dp/kadane.go "Go to page") - O(n)
* [Weighted Interval Scheduling](https://github.com/oyvinddd/algorithms/blob/master/algorithms/dp/weightedinterval.go "Go to page") - O(n)
* [Knapsack Problem](https://github.com/oyvinddd/algorithms/blob/master/algorithms/dp/knapsack.go "Go to page") - O(nW)
* [Longest Common Substring](https://github.com/oyvinddd/algorithms/blob/master/algorithms/dp/lcsubstring.go "Go to page") - O(nm)
#### Other
* [Gale-Shapeley](https://github.com/oyvinddd/algorithms/blob/master/algorithms/other/galeshapeley/galeshapeley.go "Go to page")
### Data Structures
#### Fundamental
* [Stack](https://github.com/oyvinddd/algorithms/blob/master/datastructures/stack/stack.go "Go to page")
* [Queue](https://github.com/oyvinddd/algorithms/blob/master/datastructures/queue/queue.go "Go to page")
* [Bag](https://github.com/oyvinddd/algorithms/blob/master/datastructures/bag/bag.go "Go to page")
#### Tree
* [Priority Queue](https://github.com/oyvinddd/algorithms/blob/master/datastructures/heap/pq.go "Go to page")
#### Graph
* [Undirected Graph](https://github.com/oyvinddd/algorithms/blob/master/datastructures/graphs/graph.go "Go to page")
* [Directed Graph](https://github.com/oyvinddd/algorithms/blob/master/datastructures/graphs/digraph.go "Go to page")
* [Edge-Weighted Graph](https://github.com/oyvinddd/algorithms/blob/master/datastructures/graphs/edgeweighted/ewgraph.go "Go to page")