rust_aads - Rust Algorithms And Data Structures
rust_aads is an open repository with algorithms and data structures, used in computer science and competitive programming, written with Rust.
lib.rs
file contains tests for structures and algorithms and data structures are divided into their own files. Please, message me / do PR if there is a better way to do this.
Currently implemented Data Structures
- Segment Tree -
SegmentTree
struct insegtree.rs
Currently implemented Algorithms
- Bubble Sort -
bubble_sort
function insortings. rs
- Selection Sort -
selection_sort
function insortings.rs
- Insertion Sort -
insertion_sort
function insortings.rs
TODO:
- Add more tests (with different data types and operations)
- Range operations in Segment tree
- Sorting algorithms:
- Counting Sort
- Merge Sort
- Quick Sort (qsort)
- String Processing
- Polynomial Hashing
- Rabin-Karp algorithm
- Prefix Function
- Z-Function
- Trie
- Data Structures
- Minimum / Maximum Stack & Queue
- Fenwick Tree
- Sparse Table
- Disjoint Set Union
- Algebra and Number Theory
- Binary Exponentiation
- Primality tests (Fermat's theorem)
- Euclidean GCD algorithm (and it's extended version)
- Fibonacci numbers (+ O(logN))
- Factorization
- Graph algorithms
- BFS, DFS
- Topological sort
- Dijkstra's algorithm
- MST(Prim's algorithm, Kruskal's algorithm)
- Floyd-Warshall algorithm
- Geometry
- Vector addition, subtraction, multiplication by scalar
- Dot product, Cross product