11 unstable releases (5 breaking)

new 0.6.4 Jan 23, 2025
0.5.1 Jan 17, 2025
0.4.0 Feb 23, 2020
0.3.2 Oct 11, 2018
0.2.0 Jul 24, 2018

#199 in Algorithms

Download history 299/week @ 2025-01-17

299 downloads per month

Custom license

335KB
7.5K SLoC

Algos

Crates.io Documentation CI GitHub license

🚧 Work in Progress 🚧

This crate is undergoing significant development. It aims to be a comprehensive collection of algorithms implemented in Rust, serving both as a learning resource and a practical library.

Recent Changes

Jan 16, 2025 - ADVISORY: This crate has changed hands and will be maintained by @Brad-Edwards. The repository has been moved to a new location.

Overview

A Rust library implementing a wide range of algorithms, from fundamental computer science concepts to advanced machine learning techniques.

Implementation Status

✅ Currently Implemented

Sorting Algorithms

✅ QuickSort
✅ MergeSort
✅ HeapSort
✅ BubbleSort
✅ InsertionSort
✅ SelectionSort
✅ ShellSort
✅ CountingSort
✅ RadixSort
✅ BucketSort

Searching Algorithms

✅ Linear Search
✅ Binary Search
✅ Ternary Search
✅ Interpolation Search
✅ Jump Search
✅ Exponential Search
✅ Fibonacci Search
✅ Sublist Search
✅ Depth-First Search
✅ Breadth-First Search

String Algorithms

✅ Knuth-Morris-Pratt (KMP)
✅ Rabin-Karp
✅ Boyer-Moore
✅ Z-Algorithm
✅ Aho-Corasick
✅ Suffix Array Construction
✅ Suffix Automaton
✅ Suffix Tree
✅ Rolling Hash
✅ Manacher"s Algorithm

Graph Algorithms (Part 1)

✅ Dijkstra"s Algorithm
✅ Bellman-Ford Algorithm
✅ Floyd-Warshall Algorithm
✅ Prim"s Algorithm
✅ Kruskal"s Algorithm
✅ Tarjan"s Algorithm (SCC)
✅ Kosaraju"s Algorithm
✅ Johnson"s Algorithm
✅ Warshall"s Algorithm
✅ Topological Sort

🚧 Planned Implementation

Dynamic Programming

[ ] Kadane"s Algorithm
[ ] Matrix Chain Multiplication
[ ] Edit Distance
[ ] Coin Change
[ ] Longest Common Subsequence
[ ] Longest Increasing Subsequence
[ ] Weighted Interval Scheduling
[ ] Viterbi Algorithm
[ ] Bellman Equation-based DP
[ ] Knuth Optimization

See our Algorithm Categories document for the full list of planned implementations across all categories, including:

  • Graph Algorithms (Part 2)
  • Cryptographic & Security Algorithms
  • Hashing & Hash Tables
  • Machine Learning Algorithms
  • Deep Learning & Neural Networks
  • Reinforcement Learning
  • Approximation Algorithms
  • Linear & Nonlinear Optimization
  • And many more...

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

Dependencies

~1.5–2.1MB
~44K SLoC