Skip to main content

Crate algorithms_lib

Crate algorithms_lib 

Source
Expand description

Algorithms Library for Rust

A comprehensive, zero-dependency collection of common algorithms.

Structs§

Edge
Weighted edge for graph algorithms.

Enums§

Error
Errors that can be returned by algorithms in this crate.

Functions§

a_star
A* shortest path.
activity_selection
Maximum compatible activity indices.
bellman_ford
Bellman-Ford shortest paths with negative cycle detection.
bfs
Breadth-first search.
binary_search
Binary search.
boyer_moore_search
Boyer-Moore pattern matching with the bad-character rule.
count_inversions
Inversion count.
dfs
Depth-first search.
dijkstra
Dijkstra’s shortest paths.
edit_distance
Levenshtein distance.
fast_power
Exponentiation by squaring.
fractional_knapsack
Fractional knapsack maximum value.
heap_sort
Binary max-heap sort.
huffman_coding
Huffman coding.
interpolation_search
Interpolation search for numeric data.
jump_search
Jump search.
kmp_search
Knuth-Morris-Pratt pattern matching.
knapsack_01
0/1 knapsack.
longest_common_subsequence
Longest common subsequence length.
max_subarray
Maximum subarray sum.
merge_sort
Stable merge sort.
quick_sort
Quick sort.
rabin_karp_search
Rolling-hash pattern matching.
radix_sort
LSD radix sort for non-negative integers.
tim_sort
Standard-library sort (Timsort-like).