Work in progress...
An encyclopedia of computer science algorithms and data structures.
...
By default all the links below refer to Kotlin algorithm implementations. If you prefer another language feel free to check the list of available languages.
B - Base, A - Advanced
- Graph
BBreadth-first traversal - BFSBDeapth-first traversal - DFS, recursive and iterative implementations.BTopological sorting - based on DFS, recursive and iterative implementations.BDijkstra's algorithm - greedy algorithm, finding shortest/fastest path to vertex.
- Maze
- Generation
- ...
- Pathfinding
- ...
- Generation
- Sorting
BSelection sortBInsertion sortB,AShellsort - including 14 gap sequences.BMerge sortBQuicksort - including Lomuto's and Hoare's partition schemes.BBubble sortBRadix sort
- Shuffling
- ...
- Greedy
BDijkstra's Algorithm - greedy algorithm, finding shortest/fastest path to vertex.- ...
- Divide and conquer
- ...
- Dynamic programming
- ...
- Graph
- Tree
- Heap - including max and min version.
- Hash table
- ...
algorithms
└── _tools
└── src
│ └── java
│ └── kotlіn
│ └── ...
│ └── <language-name>
│ └── _util
│ └── parallel
│ │ └── ...
│ └── sequential
│ └── graph
│ └── sorting
│ └── ...
│ └── <algorithm-category>
│ └── BUILD <-- build target definition file
│ └── <src-file(s)>
└── WORKSPACE
All the source code in this project is built with Bazel build system. Learn more about Bazel...
Bazel provides a unified way of building projects with multiple programming languages. Bazel's glanularity allows to have many build targets where each contains only source code related to the specific algorithm or data structure.
brew install bazelisknpm install -g @bazel/bazeliskLearn more about other installation options.
In order to run desired algorithm use the following command:
bazelisk run @kotlіn//sequential/graph/dijkstra:dijkstraWhere @kotlin can be replaced with any of the available languages.
- ...