Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: improve README (TheAlgorithms#454)
  • Loading branch information
imp2002 authored Feb 12, 2023
commit f756e808ac01ad33e4bcd692a2a101f75e9a31df
211 changes: 24 additions & 187 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,189 +1,26 @@
# The Algorithms - Rust [![Gitter](https://img.shields.io/gitter/room/the-algorithms/rust.svg?style=flat-square)](https://gitter.im/the-algorithms/rust) [![build](https://github.com/TheAlgorithms/Rust/actions/workflows/build.yml/badge.svg)](https://github.com/TheAlgorithms/Rust/actions/workflows/build.yml)

<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">

### All algorithms implemented in Rust

These are for demonstration purposes only.

## [Sort Algorithms](./src/sorting)

- [x] [Bubble](./src/sorting/bubble_sort.rs)
- [X] [Bucket](./src/sorting/bucket_sort.rs)
- [x] [Cocktail-Shaker](./src/sorting/cocktail_shaker_sort.rs)
- [x] [Counting](./src/sorting/counting_sort.rs)
- [x] [Cycle](./src/sorting/cycle_sort.rs)
- [x] [Exchange](./src/sorting/exchange_sort.rs)
- [x] [Heap](./src/sorting/heap_sort.rs)
- [x] [Insertion](./src/sorting/insertion_sort.rs)
- [x] [Gnome](./src/sorting/gnome_sort.rs)
- [x] [Merge](./src/sorting/merge_sort.rs)
- [x] [Odd-even](./src/sorting/odd_even_sort.rs)
- [x] [Pancake](./src/sorting/pancake_sort.rs)
- [x] [Pigeonhole](./src/sorting/pigeonhole_sort.rs)
- [x] [Quick](./src/sorting/quick_sort.rs)
- [x] [Radix](./src/sorting/radix_sort.rs)
- [x] [Selection](./src/sorting/selection_sort.rs)
- [x] [Shell](./src/sorting/shell_sort.rs)
- [x] [Stooge](./src/sorting/stooge_sort.rs)
- [x] [Comb](./src/sorting/comb_sort.rs)
- [x] [Bucket](./src/sorting/bucket_sort.rs)
- [x] [Timsort](./src/sorting/tim_sort.rs)
- [x] [Sleep](./src/sorting/sleep_sort.rs)
- [x] [Patience](./src/sorting/patience_sort.rs)

## [Graphs](./src/graph)

- [x] [Dijkstra](./src/graph/dijkstra.rs)
- [x] [Kruskal's Minimum Spanning Tree](./src/graph/minimum_spanning_tree.rs)
- [x] [Prim's Minimum Spanning Tree](./src/graph/prim.rs)
- [x] [Breadth-First Search (BFS)](./src/graph/breadth_first_search.rs)
- [x] [Depth First Search (DFS)](./src/graph/depth_first_search.rs)
- [x] [Bellman-Ford](./src/graph/bellman_ford.rs)
- [x] [Prufer Code](./src/graph/prufer_code.rs)
- [x] [Lowest Common Ancestor](./src/graph/lowest_common_ancestor.rs)
- [x] [Heavy Light Decomposition](./src/graph/heavy_light_decomposition.rs)
- [x] [Tarjan's Strongly Connected Components](./src/graph/strongly_connected_components.rs)
- [x] [Topological sorting](./src/graph/topological_sort.rs)
- [x] [Centroid Decomposition](./src/graph/centroid_decomposition.rs)
- [x] [Dinic's Max Flow](./src/graph/dinic_maxflow.rs)
- [x] [2-SAT Problem](./src/graph/two_satisfiability.rs)
- [x] [Floyd-Warshall](./src/graph/floyd_warshall.rs)

## [Math](./src/math)

- [x] [Amicable numbers below N](./src/math/amicable_numbers.rs)
- [x] [Baby-Step Giant-Step Algorithm](./src/math/baby_step_giant_step.rs)
- [x] [Ceil](./src/math/ceil.rs)
- [x] [Chinese Remainder Theorem](./src/math/chinese_remainder_theorem.rs)
- [x] [Extended euclidean algorithm](./src/math/extended_euclidean_algorithm.rs)
- [x] [Fast Inverse Square Root 'Quake' Algorithm](./src/math/square_root.rs)
- [x] [Factors](./src/math/factors.rs)
- [x] [Gaussian Elimination](./src/math/gaussian_elimination.rs)
- [x] [Greatest common divisor](./src/math/greatest_common_divisor.rs)
- [x] [Greatest common divisor of n numbers](./src/math/gcd_of_n_numbers.rs)
- [x] [Least common multiple of n numbers](./src/math/lcm_of_n_numbers.rs)
- [x] [Miller Rabin primality test](./src/math/miller_rabin.rs)
- [x] [Pascal's triangle](./src/math/pascal_triangle.rs)
- [x] [Square root with Newton's method](./src/math/square_root.rs)
- [x] [Fast power algorithm](./src/math/fast_power.rs)
- [X] [Perfect number](./src/math/perfect_numbers.rs)
- [X] [Prime factors](./src/math/prime_factors.rs)
- [X] [Prime number](./src/math/prime_numbers.rs)
- [x] [Linear Sieve](./src/math/linear_sieve.rs)
- [x] [Pollard's Rho algorithm](./src/math/pollard_rho.rs)
- [x] [Quadratic Residue](./src/math/quadratic_residue.rs)
- [x] [Simpson's Rule for Integration](./src/math/simpson_integration.rs)
- [x] [Fast Fourier Transform](./src/math/fast_fourier_transform.rs)
- [x] [Armstrong Number](./src/math/armstrong_number.rs)
- [x] [Permuted Congruential Random Number Generator](./src/math/random.rs)
- [x] [Zeller's Congruence Algorithm](./src/math/zellers_congruence_algorithm.rs)
- [x] [Karatsuba Multiplication Algorithm](./src/math/karatsuba_multiplication.rs)
- [x] [Financial Interest](./src/math/interest.rs)

## [Dynamic Programming](./src/dynamic_programming)

- [x] [0-1 Knapsack](./src/dynamic_programming/knapsack.rs)
- [x] [Edit Distance](./src/dynamic_programming/edit_distance.rs)
- [x] [Longest common subsequence](./src/dynamic_programming/longest_common_subsequence.rs)
- [x] [Longest continuous increasing subsequence](./src/dynamic_programming/longest_continuous_increasing_subsequence.rs)
- [x] [Longest increasing subsequence](./src/dynamic_programming/longest_increasing_subsequence.rs)
- [x] [K-Means Clustering](./src/general/kmeans.rs)
- [x] [Coin Change](./src/dynamic_programming/coin_change.rs)
- [x] [Rod Cutting](./src/dynamic_programming/rod_cutting.rs)
- [x] [Egg Dropping Puzzle](./src/dynamic_programming/egg_dropping.rs)
- [x] [Maximum Subarray](./src/dynamic_programming/maximum_subarray.rs)
- [x] [Is Subsequence](./src/dynamic_programming/is_subsequence.rs)
- [x] [Maximal Square](./src/dynamic_programming/maximal_square.rs)

## [Data Structures](./src/data_structures)

- [x] [Queue](./src/data_structures/queue.rs)
- [x] [Heap](./src/data_structures/heap.rs)
- [x] [Linked List](./src/data_structures/linked_list.rs)
- [x] [Graph](./src/data_structures/graph.rs)
- [x] [Directed](./src/data_structures/graph.rs)
- [x] [Undirected](./src/data_structures/graph.rs)
- [x] [Trie](./src/data_structures/trie.rs)
- [x] [Binary Search Tree](./src/data_structures/binary_search_tree.rs)
- [x] [B-Tree](./src/data_structures/b_tree.rs)
- [x] [AVL Tree](./src/data_structures/avl_tree.rs)
- [x] [RB Tree](./src/data_structures/rb_tree.rs)
- [X] [Stack using Linked List](./src/data_structures/stack_using_singly_linked_list.rs)
- [x] [Segment Tree](./src/data_structures/segment_tree.rs)
- [x] [Fenwick Tree](./src/data_structures/fenwick_tree.rs)
- [x] [Union-find](./src/data_structures/union_find.rs)
- [x] [Treap](./src/data_structures/treap.rs)

## [Strings](./src/string)

- [x] [Aho-Corasick Algorithm](./src/string/aho_corasick.rs)
- [x] [Boyer-Moore String Search Algorithm](./src/string/boyer_moore_search.rs)
- [x] [Burrows-Wheeler transform](./src/string/burrows_wheeler_transform.rs)
- [x] [Duval Algorithm](./src/string/duval_algorithm.rs)
- [x] [Knuth Morris Pratt](./src/string/knuth_morris_pratt.rs)
- [x] [Levenshtein Distance](./src/string/levenshtein_distance.rs)
- [x] [Manacher](./src/string/manacher.rs)
- [x] [Rabin Carp](./src/string/rabin_karp.rs)
- [x] [Reverse](./src/string/reverse.rs)
- [x] [Run Length Encoding](./src/string/run_length_encoding.rs)
- [x] [Hamming Distance](./src/string/hamming_distance.rs)
- [x] [Jaro-Winkler Distance](./src/string/jaro_winkler_distance.rs)
- [x] [Suffix Tree](./src/string/suffix_tree.rs)
- [x] [Suffix Array](./src/string/suffix_array.rs)
- [x] [Autocomplete using Trie](./src/string/autocomplete_using_trie.rs)

## [General](./src/general)

- [x] [Convex Hull: Graham Scan](./src/general/convex_hull.rs)
- [x] [N-Queens Problem](./src/general/nqueens.rs)
- [ ] Graph Coloring
- [x] [Tower of Hanoi](./src/general/hanoi.rs)
- [x] [Kmeans](./src/general/kmeans.rs)
- [x] [Two Sum](./src/general/two_sum.rs)
- [x] [Huffman Encoding](./src/general/huffman_encoding.rs)

## [Search Algorithms](./src/searching)

- [x] [Linear](./src/searching/linear_search.rs)
- [x] [Binary](./src/searching/binary_search.rs)
- [x] [Recursive Binary](./src/searching/binary_search_recursive.rs)
- [x] [Kth Smallest](./src/searching/kth_smallest.rs)
- [x] [Exponential](./src/searching/exponential_search.rs)
- [x] [Jump](./src/searching/jump_search.rs)
- [x] [Fibonacci](./src/searching/fibonacci_search.rs)
- [x] [Quick Select](./src/searching/quick_select.rs)

## [Geometry](./src/geometry)

- [x] [Closest pair of 2D points](./src/geometry/closest_points.rs)

## [Ciphers](./src/ciphers)

- [x] [Caesar](./src/ciphers/caesar.rs)
- [x] [Morse Code](./src/ciphers/morse_code.rs)
- [x] [Polybius](./src/ciphers/polybius.rs)
- [x] [SHA-2](./src/ciphers/sha256.rs)
- [x] [TEA](./src/ciphers/tea.rs)
- [x] [Transposition](./src/ciphers/transposition.rs)
- [x] [Vigenère](./src/ciphers/vigenere.rs)
- [x] [XOR](./src/ciphers/xor.rs)
- [x] [Salsa20](./src/ciphers/salsa.rs)
- [x] [HMAC](./src/ciphers/hashing_traits.rs)
- Rot13
- [x] [Another Rot13](./src/ciphers/another_rot13.rs)
- [x] [Rot13](./src/ciphers/rot13.rs)

## [Backtracking](./src/backtracking)

- [x] [Sudoku](./src/backtracking/sudoku.rs)
- [x] [All Combination of Size k](./src/backtracking/all_combination_of_size_k.rs)
---

### All implemented Algos

See [DIRECTORY.md](./DIRECTORY.md)
<div align="center">
<!-- Title: -->
<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">

<h1><a href="https://github.com/TheAlgorithms/">The Algorithms</a> - Rust</h1>

<!-- Labels: -->
<a href="https://github.com/TheAlgorithms/Rust/actions/workflows/build.yml">
<img src="https://github.com/TheAlgorithms/Rust/actions/workflows/build.yml/badge.svg" height="20" alt="Build workflow">
</a>
<a href="https://the-algorithms.com/discord">
<img src="https://img.shields.io/discord/808045925556682782.svg?logo=discord&colorB=00d37d" height="20" alt="Discord community">
</a>
<a href="https://gitter.im/the-algorithms/rust">
<img src="https://img.shields.io/gitter/room/the-algorithms/rust.svg?style=flat-square" height="20" alt="Gitter chat">
</a>

<!-- Short description: -->
<h3>All algorithms implemented in Rust - for education</h3>
</div>

### List of Algorithms
See our [directory](DIRECTORY.md) for easier navigation and a better overview of the project.

### Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md)
Read through our [Contribution Guidelines](CONTRIBUTING.md) before you contribute.