Here you can find the most common algorithms and data structures written in Kotlin.
The goal of this project is to create the most eloquent implementations of old algorithms in the new language. The code is meant to be as self-describing as possible, so I do not plan to include much documentation. It is assumed that you know the basics; if you want to learn algorithms perhaps it is a wrong place. I do full-heartedly recommend The Algorithm Design Manual by Steven Skiena and of course...
This project is inspired by and based on wonderful works of Robert Sedgewick and Kevin Wayne. Most of the implementations were taken from the algs4 library.
- Queue
- Stack
- Dequeue
- Priority Queue
- Indexed Priority Queue
- Disjoint Set (Union Find)
- Tree
- Binary Tree
- Binary Search Tree
- Immutable Set (based on binary search)
- Breadth First Search
- Depth First Search
- Kruskal's minimum spanning tree
- Prim's minimum spanning tree
- Boruvka's minimum spanning tree
- Dijkstra's shortest paths
- Gift wrapping (Jarvis)
- Graham Scan
- Quickhull
- Voronoi Diagram (Naïve implementation)
- Sierpinski triangle
Kotlin algorithm club is released under the MIT License.