|
1 |
| -# The Algorithms - Rust [](https://gitter.im/the-algorithms/rust) [](https://github.com/TheAlgorithms/Rust/actions/workflows/build.yml) |
2 |
| - |
3 |
| -<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Rust_programming_language_black_logo.svg/1024px-Rust_programming_language_black_logo.svg.png" width="200" height="200"> |
4 |
| - |
5 |
| -### All algorithms implemented in Rust |
6 |
| - |
7 |
| -These are for demonstration purposes only. |
8 |
| - |
9 |
| -## [Sort Algorithms](./src/sorting) |
10 |
| - |
11 |
| -- [x] [Bubble](./src/sorting/bubble_sort.rs) |
12 |
| -- [X] [Bucket](./src/sorting/bucket_sort.rs) |
13 |
| -- [x] [Cocktail-Shaker](./src/sorting/cocktail_shaker_sort.rs) |
14 |
| -- [x] [Counting](./src/sorting/counting_sort.rs) |
15 |
| -- [x] [Cycle](./src/sorting/cycle_sort.rs) |
16 |
| -- [x] [Exchange](./src/sorting/exchange_sort.rs) |
17 |
| -- [x] [Heap](./src/sorting/heap_sort.rs) |
18 |
| -- [x] [Insertion](./src/sorting/insertion_sort.rs) |
19 |
| -- [x] [Gnome](./src/sorting/gnome_sort.rs) |
20 |
| -- [x] [Merge](./src/sorting/merge_sort.rs) |
21 |
| -- [x] [Odd-even](./src/sorting/odd_even_sort.rs) |
22 |
| -- [x] [Pancake](./src/sorting/pancake_sort.rs) |
23 |
| -- [x] [Pigeonhole](./src/sorting/pigeonhole_sort.rs) |
24 |
| -- [x] [Quick](./src/sorting/quick_sort.rs) |
25 |
| -- [x] [Radix](./src/sorting/radix_sort.rs) |
26 |
| -- [x] [Selection](./src/sorting/selection_sort.rs) |
27 |
| -- [x] [Shell](./src/sorting/shell_sort.rs) |
28 |
| -- [x] [Stooge](./src/sorting/stooge_sort.rs) |
29 |
| -- [x] [Comb](./src/sorting/comb_sort.rs) |
30 |
| -- [x] [Bucket](./src/sorting/bucket_sort.rs) |
31 |
| -- [x] [Timsort](./src/sorting/tim_sort.rs) |
32 |
| -- [x] [Sleep](./src/sorting/sleep_sort.rs) |
33 |
| -- [x] [Patience](./src/sorting/patience_sort.rs) |
34 |
| - |
35 |
| -## [Graphs](./src/graph) |
36 |
| - |
37 |
| -- [x] [Dijkstra](./src/graph/dijkstra.rs) |
38 |
| -- [x] [Kruskal's Minimum Spanning Tree](./src/graph/minimum_spanning_tree.rs) |
39 |
| -- [x] [Prim's Minimum Spanning Tree](./src/graph/prim.rs) |
40 |
| -- [x] [Breadth-First Search (BFS)](./src/graph/breadth_first_search.rs) |
41 |
| -- [x] [Depth First Search (DFS)](./src/graph/depth_first_search.rs) |
42 |
| -- [x] [Bellman-Ford](./src/graph/bellman_ford.rs) |
43 |
| -- [x] [Prufer Code](./src/graph/prufer_code.rs) |
44 |
| -- [x] [Lowest Common Ancestor](./src/graph/lowest_common_ancestor.rs) |
45 |
| -- [x] [Heavy Light Decomposition](./src/graph/heavy_light_decomposition.rs) |
46 |
| -- [x] [Tarjan's Strongly Connected Components](./src/graph/strongly_connected_components.rs) |
47 |
| -- [x] [Topological sorting](./src/graph/topological_sort.rs) |
48 |
| -- [x] [Centroid Decomposition](./src/graph/centroid_decomposition.rs) |
49 |
| -- [x] [Dinic's Max Flow](./src/graph/dinic_maxflow.rs) |
50 |
| -- [x] [2-SAT Problem](./src/graph/two_satisfiability.rs) |
51 |
| -- [x] [Floyd-Warshall](./src/graph/floyd_warshall.rs) |
52 |
| - |
53 |
| -## [Math](./src/math) |
54 |
| - |
55 |
| -- [x] [Amicable numbers below N](./src/math/amicable_numbers.rs) |
56 |
| -- [x] [Baby-Step Giant-Step Algorithm](./src/math/baby_step_giant_step.rs) |
57 |
| -- [x] [Ceil](./src/math/ceil.rs) |
58 |
| -- [x] [Chinese Remainder Theorem](./src/math/chinese_remainder_theorem.rs) |
59 |
| -- [x] [Extended euclidean algorithm](./src/math/extended_euclidean_algorithm.rs) |
60 |
| -- [x] [Fast Inverse Square Root 'Quake' Algorithm](./src/math/square_root.rs) |
61 |
| -- [x] [Factors](./src/math/factors.rs) |
62 |
| -- [x] [Gaussian Elimination](./src/math/gaussian_elimination.rs) |
63 |
| -- [x] [Greatest common divisor](./src/math/greatest_common_divisor.rs) |
64 |
| -- [x] [Greatest common divisor of n numbers](./src/math/gcd_of_n_numbers.rs) |
65 |
| -- [x] [Least common multiple of n numbers](./src/math/lcm_of_n_numbers.rs) |
66 |
| -- [x] [Miller Rabin primality test](./src/math/miller_rabin.rs) |
67 |
| -- [x] [Pascal's triangle](./src/math/pascal_triangle.rs) |
68 |
| -- [x] [Square root with Newton's method](./src/math/square_root.rs) |
69 |
| -- [x] [Fast power algorithm](./src/math/fast_power.rs) |
70 |
| -- [X] [Perfect number](./src/math/perfect_numbers.rs) |
71 |
| -- [X] [Prime factors](./src/math/prime_factors.rs) |
72 |
| -- [X] [Prime number](./src/math/prime_numbers.rs) |
73 |
| -- [x] [Linear Sieve](./src/math/linear_sieve.rs) |
74 |
| -- [x] [Pollard's Rho algorithm](./src/math/pollard_rho.rs) |
75 |
| -- [x] [Quadratic Residue](./src/math/quadratic_residue.rs) |
76 |
| -- [x] [Simpson's Rule for Integration](./src/math/simpson_integration.rs) |
77 |
| -- [x] [Fast Fourier Transform](./src/math/fast_fourier_transform.rs) |
78 |
| -- [x] [Armstrong Number](./src/math/armstrong_number.rs) |
79 |
| -- [x] [Permuted Congruential Random Number Generator](./src/math/random.rs) |
80 |
| -- [x] [Zeller's Congruence Algorithm](./src/math/zellers_congruence_algorithm.rs) |
81 |
| -- [x] [Karatsuba Multiplication Algorithm](./src/math/karatsuba_multiplication.rs) |
82 |
| -- [x] [Financial Interest](./src/math/interest.rs) |
83 |
| - |
84 |
| -## [Dynamic Programming](./src/dynamic_programming) |
85 |
| - |
86 |
| -- [x] [0-1 Knapsack](./src/dynamic_programming/knapsack.rs) |
87 |
| -- [x] [Edit Distance](./src/dynamic_programming/edit_distance.rs) |
88 |
| -- [x] [Longest common subsequence](./src/dynamic_programming/longest_common_subsequence.rs) |
89 |
| -- [x] [Longest continuous increasing subsequence](./src/dynamic_programming/longest_continuous_increasing_subsequence.rs) |
90 |
| -- [x] [Longest increasing subsequence](./src/dynamic_programming/longest_increasing_subsequence.rs) |
91 |
| -- [x] [K-Means Clustering](./src/general/kmeans.rs) |
92 |
| -- [x] [Coin Change](./src/dynamic_programming/coin_change.rs) |
93 |
| -- [x] [Rod Cutting](./src/dynamic_programming/rod_cutting.rs) |
94 |
| -- [x] [Egg Dropping Puzzle](./src/dynamic_programming/egg_dropping.rs) |
95 |
| -- [x] [Maximum Subarray](./src/dynamic_programming/maximum_subarray.rs) |
96 |
| -- [x] [Is Subsequence](./src/dynamic_programming/is_subsequence.rs) |
97 |
| -- [x] [Maximal Square](./src/dynamic_programming/maximal_square.rs) |
98 |
| - |
99 |
| -## [Data Structures](./src/data_structures) |
100 |
| - |
101 |
| -- [x] [Queue](./src/data_structures/queue.rs) |
102 |
| -- [x] [Heap](./src/data_structures/heap.rs) |
103 |
| -- [x] [Linked List](./src/data_structures/linked_list.rs) |
104 |
| -- [x] [Graph](./src/data_structures/graph.rs) |
105 |
| - - [x] [Directed](./src/data_structures/graph.rs) |
106 |
| - - [x] [Undirected](./src/data_structures/graph.rs) |
107 |
| -- [x] [Trie](./src/data_structures/trie.rs) |
108 |
| -- [x] [Binary Search Tree](./src/data_structures/binary_search_tree.rs) |
109 |
| -- [x] [B-Tree](./src/data_structures/b_tree.rs) |
110 |
| -- [x] [AVL Tree](./src/data_structures/avl_tree.rs) |
111 |
| -- [x] [RB Tree](./src/data_structures/rb_tree.rs) |
112 |
| -- [X] [Stack using Linked List](./src/data_structures/stack_using_singly_linked_list.rs) |
113 |
| -- [x] [Segment Tree](./src/data_structures/segment_tree.rs) |
114 |
| -- [x] [Fenwick Tree](./src/data_structures/fenwick_tree.rs) |
115 |
| -- [x] [Union-find](./src/data_structures/union_find.rs) |
116 |
| -- [x] [Treap](./src/data_structures/treap.rs) |
117 |
| - |
118 |
| -## [Strings](./src/string) |
119 |
| - |
120 |
| -- [x] [Aho-Corasick Algorithm](./src/string/aho_corasick.rs) |
121 |
| -- [x] [Boyer-Moore String Search Algorithm](./src/string/boyer_moore_search.rs) |
122 |
| -- [x] [Burrows-Wheeler transform](./src/string/burrows_wheeler_transform.rs) |
123 |
| -- [x] [Duval Algorithm](./src/string/duval_algorithm.rs) |
124 |
| -- [x] [Knuth Morris Pratt](./src/string/knuth_morris_pratt.rs) |
125 |
| -- [x] [Levenshtein Distance](./src/string/levenshtein_distance.rs) |
126 |
| -- [x] [Manacher](./src/string/manacher.rs) |
127 |
| -- [x] [Rabin Carp](./src/string/rabin_karp.rs) |
128 |
| -- [x] [Reverse](./src/string/reverse.rs) |
129 |
| -- [x] [Run Length Encoding](./src/string/run_length_encoding.rs) |
130 |
| -- [x] [Hamming Distance](./src/string/hamming_distance.rs) |
131 |
| -- [x] [Jaro-Winkler Distance](./src/string/jaro_winkler_distance.rs) |
132 |
| -- [x] [Suffix Tree](./src/string/suffix_tree.rs) |
133 |
| -- [x] [Suffix Array](./src/string/suffix_array.rs) |
134 |
| -- [x] [Autocomplete using Trie](./src/string/autocomplete_using_trie.rs) |
135 |
| - |
136 |
| -## [General](./src/general) |
137 |
| - |
138 |
| -- [x] [Convex Hull: Graham Scan](./src/general/convex_hull.rs) |
139 |
| -- [x] [N-Queens Problem](./src/general/nqueens.rs) |
140 |
| -- [ ] Graph Coloring |
141 |
| -- [x] [Tower of Hanoi](./src/general/hanoi.rs) |
142 |
| -- [x] [Kmeans](./src/general/kmeans.rs) |
143 |
| -- [x] [Two Sum](./src/general/two_sum.rs) |
144 |
| -- [x] [Huffman Encoding](./src/general/huffman_encoding.rs) |
145 |
| - |
146 |
| -## [Search Algorithms](./src/searching) |
147 |
| - |
148 |
| -- [x] [Linear](./src/searching/linear_search.rs) |
149 |
| -- [x] [Binary](./src/searching/binary_search.rs) |
150 |
| -- [x] [Recursive Binary](./src/searching/binary_search_recursive.rs) |
151 |
| -- [x] [Kth Smallest](./src/searching/kth_smallest.rs) |
152 |
| -- [x] [Exponential](./src/searching/exponential_search.rs) |
153 |
| -- [x] [Jump](./src/searching/jump_search.rs) |
154 |
| -- [x] [Fibonacci](./src/searching/fibonacci_search.rs) |
155 |
| -- [x] [Quick Select](./src/searching/quick_select.rs) |
156 |
| - |
157 |
| -## [Geometry](./src/geometry) |
158 |
| - |
159 |
| -- [x] [Closest pair of 2D points](./src/geometry/closest_points.rs) |
160 |
| - |
161 |
| -## [Ciphers](./src/ciphers) |
162 |
| - |
163 |
| -- [x] [Caesar](./src/ciphers/caesar.rs) |
164 |
| -- [x] [Morse Code](./src/ciphers/morse_code.rs) |
165 |
| -- [x] [Polybius](./src/ciphers/polybius.rs) |
166 |
| -- [x] [SHA-2](./src/ciphers/sha256.rs) |
167 |
| -- [x] [TEA](./src/ciphers/tea.rs) |
168 |
| -- [x] [Transposition](./src/ciphers/transposition.rs) |
169 |
| -- [x] [Vigenère](./src/ciphers/vigenere.rs) |
170 |
| -- [x] [XOR](./src/ciphers/xor.rs) |
171 |
| -- [x] [Salsa20](./src/ciphers/salsa.rs) |
172 |
| -- [x] [HMAC](./src/ciphers/hashing_traits.rs) |
173 |
| -- Rot13 |
174 |
| - - [x] [Another Rot13](./src/ciphers/another_rot13.rs) |
175 |
| - - [x] [Rot13](./src/ciphers/rot13.rs) |
176 |
| - |
177 |
| -## [Backtracking](./src/backtracking) |
178 |
| - |
179 |
| -- [x] [Sudoku](./src/backtracking/sudoku.rs) |
180 |
| -- [x] [All Combination of Size k](./src/backtracking/all_combination_of_size_k.rs) |
181 |
| ---- |
182 |
| - |
183 |
| -### All implemented Algos |
184 |
| - |
185 |
| -See [DIRECTORY.md](./DIRECTORY.md) |
| 1 | +<div align="center"> |
| 2 | +<!-- Title: --> |
| 3 | +<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Rust_programming_language_black_logo.svg/1024px-Rust_programming_language_black_logo.svg.png" width="100" height="100"> |
| 4 | + |
| 5 | +<h1><a href="https://github.com/TheAlgorithms/">The Algorithms</a> - Rust</h1> |
| 6 | + |
| 7 | +<!-- Labels: --> |
| 8 | +<a href="https://github.com/TheAlgorithms/Rust/actions/workflows/build.yml"> |
| 9 | + <img src="https://github.com/TheAlgorithms/Rust/actions/workflows/build.yml/badge.svg" height="20" alt="Build workflow"> |
| 10 | +</a> |
| 11 | +<a href="https://the-algorithms.com/discord"> |
| 12 | + <img src="https://img.shields.io/discord/808045925556682782.svg?logo=discord&colorB=00d37d" height="20" alt="Discord community"> |
| 13 | +</a> |
| 14 | +<a href="https://gitter.im/the-algorithms/rust"> |
| 15 | + <img src="https://img.shields.io/gitter/room/the-algorithms/rust.svg?style=flat-square" height="20" alt="Gitter chat"> |
| 16 | +</a> |
| 17 | + |
| 18 | +<!-- Short description: --> |
| 19 | + <h3>All algorithms implemented in Rust - for education</h3> |
| 20 | +</div> |
| 21 | + |
| 22 | +### List of Algorithms |
| 23 | +See our [directory](DIRECTORY.md) for easier navigation and a better overview of the project. |
186 | 24 |
|
187 | 25 | ### Contributing
|
188 |
| - |
189 |
| -See [CONTRIBUTING.md](CONTRIBUTING.md) |
| 26 | +Read through our [Contribution Guidelines](CONTRIBUTING.md) before you contribute. |
0 commit comments