|
1 |
| -# Alrogirms and Data Structures |
| 1 | +# Algorithms and Data Structures Encyclopedia |
| 2 | +**Work in progress...** |
| 3 | + |
| 4 | +A encyclopedia of computer science algorithms and data structures. |
| 5 | +## Available languages |
| 6 | +- [Java](src/java) |
| 7 | +- [Kotlin](src/kotlin) |
| 8 | +- [Python](src/python) |
| 9 | +- [Swift](src/swift) |
| 10 | +- ... |
| 11 | +## Algorithms |
2 | 12 | ...
|
| 13 | + |
| 14 | +All the links refer to `Kotlin` implementations by default. If you prefer another language feel free to check the list of [available languages](#available-languages). |
| 15 | + |
| 16 | +`B` - Base, `A` - Advanced |
| 17 | +### By category |
| 18 | +- **Graph** |
| 19 | + - `B` [Breadth-First Traversal](src/kotlin/sequential/graph/bfs) - BFS |
| 20 | + - `B` [Deapth-First Traversal](src/kotlin/sequential/graph/dfs) - DFS, recursive and iterative implementations. |
| 21 | + - `B` [Topological Sorting](src/kotlin/sequential/graph/topologicalsort) - based on DFS, recursive and iterative implementations. |
| 22 | + - `B` [Dijkstra's Algorithm](src/kotlin/sequential/graph/dijkstra) - greedy algorithm, finding shortest/fastest path to vertex. |
| 23 | +- **Maze** |
| 24 | + - Generation |
| 25 | + - ... |
| 26 | + - Pathfinding |
| 27 | + - ... |
| 28 | +- **Sorting** |
| 29 | + - `B` [Selection sort](src/kotlin/sorting/selectionsort) |
| 30 | + - `B` [Insertion sort](src/kotlin/sorting/insertionsort) |
| 31 | + - `B`, `A` [Shellsort](src/kotlin/sorting/shellsort) - including 14 gap sequences. |
| 32 | + - `B` [Merge sort](src/kotlin/sorting/mergesort) |
| 33 | + - `B` [Quicksort]() - including Lomuto's and Hoare's partition schemes. |
| 34 | + - `B` [Bubble sort](src/kotlin/sorting/bubblesort) |
| 35 | + - `B` [Radix sort](src/kotlin/sorting/radixsort) |
| 36 | +- **Shuffling** |
| 37 | + - `B` [Fisher-Yates shuffling](src/kotlin/shuffling/fisheryates) |
| 38 | + - `A` [Sattolo shuffling](src/kotlin/shuffling/sattolo) |
| 39 | +- ... |
| 40 | + |
| 41 | +### By design paradigm |
| 42 | +- **Greedy** |
| 43 | + - `B` [Dijkstra's Algorithm](src/kotlin/sequential/graph/dijkstra) - greedy algorithm, finding shortest/fastest path to vertex. |
| 44 | + - ... |
| 45 | +- **Divide and conquer** |
| 46 | + - ... |
| 47 | +- **Dynamic programming** |
| 48 | + - ... |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +## Data structures |
| 55 | +- [Graph]() |
| 56 | +- [Tree]() |
| 57 | + - `B` [Binary search tree]() |
| 58 | + - `A` [AVL tree]() |
| 59 | + - `A` [Red-Black tree]() |
| 60 | +- [Heap]() - including **max** and **min** version. |
| 61 | +- [Hash table]() |
| 62 | +- ... |
| 63 | +## Project structure |
| 64 | +``` |
| 65 | +algorithms |
| 66 | +└── _tools |
| 67 | +└── src |
| 68 | + └── java |
| 69 | + └── kotlіn |
| 70 | + └── ... |
| 71 | + └── <language-name> |
| 72 | + └── _util |
| 73 | + └── parallel |
| 74 | + │ └── ... |
| 75 | + └── sequential |
| 76 | + └── graph |
| 77 | + └── sorting |
| 78 | + └── ... |
| 79 | + └── <algorithm-category> |
| 80 | + └── BUILD <-- build target definition file |
| 81 | + └── <src-file(s)> |
| 82 | +``` |
| 83 | +## How to build source code |
| 84 | +All the source code in this project is built with Bazel build system. [Learn more about Bazel...](https://bazel.build/) |
| 85 | + |
| 86 | +### Why Bazel? |
| 87 | +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. |
| 88 | + |
| 89 | +### Install on macOS |
| 90 | + |
| 91 | +```bash |
| 92 | +brew install bazelisk |
| 93 | +``` |
| 94 | +### Install on Windows, Linux and macOS |
| 95 | +```bash |
| 96 | +npm install -g @bazel/bazelisk |
| 97 | +``` |
| 98 | +Learn more about [other installation options](https://docs.bazel.build/versions/master/install-bazelisk.html). |
| 99 | +### Run algorithms |
| 100 | +In order to run desired algorithm use the following command: |
| 101 | +```bash |
| 102 | +bazelisk run @kotlіn//sequential/graph/dijkstra:dijkstra |
| 103 | +``` |
| 104 | +Where `@kotlin` can be replaced with any of the [available languages](#available-languages). |
| 105 | +## Useful references |
| 106 | +- ... |
0 commit comments