# ebtech/rust-algorithms

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/ebtech-rust-algorithms).**

3,972 stars · 234 forks · Rust · MIT

## Links

- GitHub: https://github.com/EbTech/rust-algorithms
- awesome-repositories: https://awesome-repositories.com/repository/ebtech-rust-algorithms.md

## Topics

`algorithm` `algorithms` `codeforces` `competition-programmers` `cookbook` `data-structures` `education` `learn` `programming-contests` `rust`

## Description

This is a collection of standard data structures and algorithmic implementations written in Rust. It provides a suite of specialized libraries designed for competitive programming and systems engineering.

The project is organized into distinct toolkits for graph theory, number theory, range queries, and string processing. It includes implementations for computing shortest paths and network flows, performing primality tests and modular arithmetic, and managing associative range queries.

The library covers broad computational areas including signal processing via fast Fourier transforms, text analysis using suffix arrays and tries, and data organization through coordinate compression and sorting utilities. It also provides tools for parsing input data from files or standard I/O.

## Tags

### Development Tools & Productivity

- [Competitive Programming Toolkits](https://awesome-repositories.com/f/development-tools-productivity/terminal-shell-cli/competitive-programming-tools/competitive-programming-toolkits.md) — Provides a comprehensive toolkit of efficient data structures and algorithms tailored for competitive programming in Rust.

### Scientific & Mathematical Computing

- [Competitive Programming Libraries](https://awesome-repositories.com/f/scientific-mathematical-computing/competitive-programming-libraries.md) — Provides a specialized suite of standard data structures and algorithms in Rust for competitive programming and systems engineering.
- [Binary Indexed Trees](https://awesome-repositories.com/f/scientific-mathematical-computing/binary-indexed-trees.md) — Provides binary indexed trees (Fenwick trees) for fast range sum queries and element updates.
- [Number Theory Algorithms](https://awesome-repositories.com/f/scientific-mathematical-computing/number-theory-algorithms.md) — Implements computational number theory algorithms such as GCD, modular inverses, and primality testing.
- [Complex and Modular Arithmetic](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/arithmetic-number-types/arithmetic-operations/complex-and-modular-arithmetic.md) — Provides a utility for high-precision calculations involving rational, complex, and modular arithmetic. ([source](https://github.com/ebtech/rust-algorithms#readme))
- [Modular Arithmetic Classes](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/arithmetic-number-types/multiplication-algorithms/number-theory-algorithms/modular-arithmetic-classes.md) — Provides modular arithmetic wrappers to handle calculations within a fixed prime modulus.
- [Primality Testing](https://awesome-repositories.com/f/scientific-mathematical-computing/numerical-mathematical-foundations/arithmetic-number-types/multiplication-algorithms/number-theory-algorithms/prime-generation-algorithms/primality-testing.md) — Provides primality tests and greatest common divisor calculations for integer arithmetic. ([source](https://github.com/ebtech/rust-algorithms#readme))
- [Coordinate Compression](https://awesome-repositories.com/f/scientific-mathematical-computing/coordinate-compression.md) — Implements coordinate compression to reduce memory usage when sorting large sparse value ranges.
- [Fourier Transform Implementations](https://awesome-repositories.com/f/scientific-mathematical-computing/data-modeling-processing/signal-processing/digital-signal-processing-libraries/signal-convolutions/fourier-transform-implementations.md) — Implements fast Fourier transforms and convolutions for frequency domain analysis and polynomial multiplication.
- [Fourier Transforms](https://awesome-repositories.com/f/scientific-mathematical-computing/data-modeling-processing/signal-processing/fourier-transforms.md) — Implements fast Fourier transforms for converting signals between time and frequency domains.
- [Sorting and Searching Implementations](https://awesome-repositories.com/f/scientific-mathematical-computing/sorting-and-searching-implementations.md) — Provides a collection of classic sorting and searching implementations including binary search and merge sort. ([source](https://github.com/ebtech/rust-algorithms#readme))

### Data & Databases

- [Graph Libraries](https://awesome-repositories.com/f/data-databases/graph-computing-systems/graph-theory/graph-libraries.md) — Provides a comprehensive library of graph algorithms including shortest paths and network flow implemented in Rust.
- [Adjacency Lists](https://awesome-repositories.com/f/data-databases/list-data-structures/adjacency-lists.md) — Implements adjacency lists for efficient graph representation and traversal of sparse network structures.

### Education & Learning Resources

- [Network Flow Algorithms](https://awesome-repositories.com/f/education-learning-resources/educational-resources/algorithms-theory-academics/cs-theory-foundations/algorithms/data-ordering-and-retrieval/network-flow-algorithms.md) — Provides algorithms for calculating maximum flow and minimum cuts in directed graphs. ([source](https://github.com/ebtech/rust-algorithms#readme))
- [Minimum Spanning Tree Algorithms](https://awesome-repositories.com/f/education-learning-resources/graph-problem-solving/minimum-spanning-tree-algorithms.md) — Implements both shortest path and minimum spanning tree algorithms for graph analysis. ([source](https://github.com/ebtech/rust-algorithms#readme))
- [Graph Algorithm Routines](https://awesome-repositories.com/f/education-learning-resources/graph-theory-algorithms/graph-algorithm-routines.md) — Implements reusable routines for shortest paths, minimum spanning trees, and maximum flow for competitive programming.

### Programming Languages & Runtimes

- [Lazy Propagation](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-structures/hierarchical-tree-structures/segment-trees/lazy-propagation.md) — Provides segment trees with lazy propagation for efficient deferred range updates and queries.

### Software Engineering & Architecture

- [Range Queries](https://awesome-repositories.com/f/software-engineering-architecture/algorithmic-problem-solving/array-manipulation-solutions/range-queries.md) — Implements associative range queries using segment trees and binary indexed trees. ([source](https://github.com/ebtech/rust-algorithms#readme))
- [Range Update Queries](https://awesome-repositories.com/f/software-engineering-architecture/algorithmic-problem-solving/array-manipulation-solutions/range-queries/range-update-queries.md) — Provides efficient range update and query capabilities using binary indexed trees and segment trees with lazy propagation.
- [Disjoint Set Union](https://awesome-repositories.com/f/software-engineering-architecture/disjoint-set-union.md) — Provides a disjoint-set union (union-find) implementation with path compression for connectivity tracking.
- [String Matching Algorithms](https://awesome-repositories.com/f/software-engineering-architecture/string-matching-algorithms.md) — Provides implementations for tries, suffix arrays, and pattern matching to analyze text sequences. ([source](https://github.com/ebtech/rust-algorithms#readme))
- [String Processing Algorithms](https://awesome-repositories.com/f/software-engineering-architecture/string-processing-algorithms.md) — Implements advanced string processing algorithms including suffix arrays and tries for text analysis.
- [String Matching Tries](https://awesome-repositories.com/f/software-engineering-architecture/trie-data-structures/prefix-trie-filters/string-matching-tries.md) — Implements trie-based structures for fast prefix lookups and string retrieval.

### Part of an Awesome List

- [Rust in practice](https://awesome-repositories.com/f/awesome-lists/more/rust-in-practice.md) — Listed in the “Rust in practice” section of the Rust Learning awesome list.
