From 749f302918fcd6621ce3a9643f38146a3c9cb2f6 Mon Sep 17 00:00:00 2001 From: AmirSaeed AryanMehr Date: Wed, 14 Oct 2026 17:18:17 +0330 Subject: [PATCH 1/3] Add bisection method for root finding --- src/math/bisection.rs | 224 ++++++++++++++++++++++++++++++++++++++++++ src/math/mod.rs | 2 + 2 files changed, 226 insertions(+) create mode 100644 src/math/bisection.rs diff --git a/src/math/bisection.rs b/src/math/bisection.rs new file mode 100644 index 00000000000..2b26df6d0c1 --- /dev/null +++ b/src/math/bisection.rs @@ -0,0 +1,224 @@ +//! Bisection method for finding a root of a continuous function. +//! +//! Given an interval `[lower, upper]` where `f(lower)` and `f(upper)` have +//! opposite signs, a root is guaranteed to exist inside it (intermediate value +//! theorem). Each step halves the interval, keeping the half that still has a +//! sign change. +//! +//! Unlike Newton-Raphson this needs no derivative and cannot diverge, but it +//! converges more slowly (one bit of accuracy per iteration). + +/// Finds a root of `f` inside `[lower, upper]` using the bisection method. +/// +/// Returns `None` if: +/// - a bound is NaN or infinite, or `tolerance` is not a positive number, +/// - `f` is NaN at either bound, +/// - `f(lower)` and `f(upper)` have the same sign (no root is guaranteed), or +/// - the interval does not shrink below `tolerance` within `max_iterations`. +pub fn bisection( + f: F, + lower: f64, + upper: f64, + tolerance: f64, + max_iterations: usize, +) -> Option +where + F: Fn(f64) -> f64, +{ + if !lower.is_finite() || !upper.is_finite() || !tolerance.is_finite() || tolerance <= 0.0 { + return None; + } + + let (mut lower, mut upper) = if lower <= upper { + (lower, upper) + } else { + (upper, lower) + }; + + let f_lower = f(lower); + let f_upper = f(upper); + + if f_lower.is_nan() || f_upper.is_nan() { + return None; + } + + if f_lower == 0.0 { + return Some(lower); + } + + if f_upper == 0.0 { + return Some(upper); + } + + if f_lower.signum() == f_upper.signum() { + return None; + } + + let f_lower_sign = f_lower.signum(); + + for _ in 0..max_iterations { + let mid = f64::midpoint(lower, upper); + + if upper - lower <= tolerance { + return Some(mid); + } + + let f_mid = f(mid); + if f_mid == 0.0 { + return Some(mid); + } + + // move lower to mid if only they have the samve sign bit. + // As long as we have this if check we don't need to update + // the `f_lower_sign` because it's sign bit will be preserved. + if f_mid.signum() == f_lower_sign { + lower = mid; + } else { + upper = mid; + } + } + + return None; +} + +#[cfg(test)] +mod tests { + use super::*; + + const EPSILON: f64 = 1e-6; + + fn assert_approx_eq(actual: f64, expected: f64, tolerance: f64) { + assert!( + (actual - expected).abs() <= tolerance, + "expected {expected}, got {actual}" + ); + } + + #[test] + fn finds_root_of_linear_function() { + let root = bisection(|x| 2.0 * x - 6.0, 0.0, 5.0, EPSILON, 100); + + assert_approx_eq(root.unwrap(), 3.0, EPSILON); + } + + #[test] + fn finds_root_of_quadratic_function() { + let root = bisection(|x| x * x - 4.0, 0.0, 3.0, EPSILON, 100); + + assert_approx_eq(root.unwrap(), 2.0, EPSILON); + } + + #[test] + fn finds_root_of_nonlinear_function() { + let root = bisection(|x| x.cos() - x, 0.0, 1.0, EPSILON, 100); + + assert_approx_eq(root.unwrap(), 0.739085, EPSILON); + } + + #[test] + fn finds_root_when_lower_bound_is_root() { + let root = bisection(|x| x, 0.0, 5.0, EPSILON, 100); + + assert_eq!(root, Some(0.0)); + } + + #[test] + fn finds_root_when_upper_bound_is_root() { + let root = bisection(|x| x, -5.0, 0.0, EPSILON, 100); + + assert_eq!(root, Some(0.0)); + } + + #[test] + fn handles_reversed_bounds() { + let root = bisection(|x| x - 2.0, 5.0, 0.0, EPSILON, 100); + + assert_approx_eq(root.unwrap(), 2.0, EPSILON); + } + + #[test] + fn accepts_root_at_negative_zero() { + let root = bisection(|x| x + 1.0, -1.0, 5.0, EPSILON, 100); + + assert_eq!(root, Some(-1.0)); + } + + #[test] + fn returns_none_when_bounds_have_same_sign() { + let root = bisection(|x| x * x + 1.0, -2.0, 2.0, EPSILON, 100); + + assert_eq!(root, None); + } + + #[test] + fn returns_none_when_function_is_nan_at_lower_bound() { + let root = bisection( + |x| if x == 0.0 { f64::NAN } else { x - 1.0 }, + 0.0, + 2.0, + EPSILON, + 100, + ); + + assert_eq!(root, None); + } + + #[test] + fn returns_none_when_function_is_nan_at_upper_bound() { + let root = bisection( + |x| if x == 2.0 { f64::NAN } else { x - 1.0 }, + 0.0, + 2.0, + EPSILON, + 100, + ); + + assert_eq!(root, None); + } + + #[test] + fn returns_none_for_nan_bounds() { + assert_eq!(bisection(|x| x, f64::NAN, 1.0, EPSILON, 100), None); + + assert_eq!(bisection(|x| x, 0.0, f64::NAN, EPSILON, 100), None); + } + + #[test] + fn returns_none_for_infinite_bounds() { + assert_eq!(bisection(|x| x, f64::NEG_INFINITY, 1.0, EPSILON, 100), None); + + assert_eq!(bisection(|x| x, 0.0, f64::INFINITY, EPSILON, 100), None); + } + + #[test] + fn returns_none_for_invalid_tolerance() { + for tolerance in [0.0, -1.0, f64::NAN, f64::INFINITY, f64::NEG_INFINITY] { + assert_eq!( + bisection(|x| x - 1.0, 0.0, 2.0, tolerance, 100), + None, + "unexpected result for tolerance = {tolerance}" + ); + } + } + + #[test] + fn returns_none_when_max_iterations_is_zero() { + let root = bisection(|x| x - 1.0, 0.0, 2.0, EPSILON, 0); + + assert_eq!(root, None); + } + + #[test] + fn returns_none_when_max_iterations_is_insufficient() { + let root = bisection(|x| x * x - 2.0, 0.0, 2.0, 1e-12, 3); + + assert_eq!(root, None); + } + + #[test] + fn returns_midpoint_when_interval_is_already_within_tolerance() { + let root = bisection(|x| x - 1.0, 0.0, 2.0, 2.0, 100); + + assert_eq!(root, Some(1.0)); + } +} diff --git a/src/math/mod.rs b/src/math/mod.rs index 7407465c3b0..6356a0006cf 100644 --- a/src/math/mod.rs +++ b/src/math/mod.rs @@ -9,6 +9,7 @@ mod baby_step_giant_step; mod bell_numbers; mod binary_exponentiation; mod binomial_coefficient; +mod bisection; mod catalan_numbers; mod ceil; mod chinese_remainder_theorem; @@ -93,6 +94,7 @@ pub use self::baby_step_giant_step::baby_step_giant_step; pub use self::bell_numbers::bell_number; pub use self::binary_exponentiation::binary_exponentiation; pub use self::binomial_coefficient::binom; +pub use self::bisection::bisection; pub use self::catalan_numbers::init_catalan; pub use self::ceil::ceil; pub use self::chinese_remainder_theorem::chinese_remainder_theorem; From f71a3e71e9ea2f124bf1bb3b6fb784a1928a4c43 Mon Sep 17 00:00:00 2001 From: AmirSaeed AryanMehr Date: Wed, 14 Oct 2026 17:22:02 +0330 Subject: [PATCH 2/3] Add bisection to DIRECTORY.md --- DIRECTORY.md | 840 ++++++++++++++++++++++++++------------------------- 1 file changed, 421 insertions(+), 419 deletions(-) diff --git a/DIRECTORY.md b/DIRECTORY.md index 9aa67f51c80..aba712ab8e1 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -1,422 +1,424 @@ # List of all files ## src - * Backtracking - * [All Combinations of Size K](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/all_combination_of_size_k.rs) - * [Graph Coloring](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/graph_coloring.rs) - * [Hamiltonian Cycle](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/hamiltonian_cycle.rs) - * [Knight Tour](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/knight_tour.rs) - * [N-Queens](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/n_queens.rs) - * [Parentheses Generator](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/parentheses_generator.rs) - * [Permutations](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/permutations.rs) - * [Rat in Maze](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/rat_in_maze.rs) - * [Subset Sum](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/subset_sum.rs) - * [Sudoku](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/sudoku.rs) - * Big Integer - * [Fast Factorial](https://github.com/TheAlgorithms/Rust/blob/master/src/big_integer/fast_factorial.rs) - * [Multiply](https://github.com/TheAlgorithms/Rust/blob/master/src/big_integer/multiply.rs) - * [Poly1305](https://github.com/TheAlgorithms/Rust/blob/master/src/big_integer/poly1305.rs) - * Bit Manipulation - * [Binary Coded Decimal](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/binary_coded_decimal.rs) - * [Binary Shifts](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/binary_shifts.rs) - * [Counting Bits](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/counting_bits.rs) - * [Hamming Distance](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/hamming_distance.rs) - * [Highest Set Bit](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/highest_set_bit.rs) - * [Is Power of Two](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/is_power_of_two.rs) - * [Missing Number](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/find_missing_number.rs) - * [N Bits Gray Code](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/n_bits_gray_code.rs) - * [Previous Power of Two](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/find_previous_power_of_two.rs) - * [Reverse Bits](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/reverse_bits.rs) - * [Rightmost Set Bit](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/rightmost_set_bit.rs) - * [Sum of Two Integers](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/sum_of_two_integers.rs) - * [Swap Odd and Even Bits](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/swap_odd_even_bits.rs) - * [Trailing Zeros](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/binary_count_trailing_zeros.rs) - * [Two's Complement](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/twos_complement.rs) - * [Unique Number](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/find_unique_number.rs) - * Ciphers - * [AES](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/aes.rs) - * [Affine Cipher](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/affine_cipher.rs) - * [Another ROT13](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/another_rot13.rs) - * [Baconian Cipher](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/baconian_cipher.rs) - * [Base16](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/base16.rs) - * [Base32](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/base32.rs) - * [Base64](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/base64.rs) - * [Base85](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/base85.rs) - * [Caesar](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/caesar.rs) - * [Chacha](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/chacha.rs) - * [Diffie-Hellman](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/diffie_hellman.rs) - * [Hill Cipher](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/hill_cipher.rs) - * [Kernighan](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/kernighan.rs) - * [Morse Code](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/morse_code.rs) - * [Polybius](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/polybius.rs) - * [Rail Fence](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/rail_fence.rs) - * [ROT13](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/rot13.rs) - * [RSA Cipher](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/rsa_cipher.rs) - * [Salsa](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/salsa.rs) - * [Tea](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/tea.rs) - * [Theoretical ROT13](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/theoretical_rot13.rs) - * [Transposition](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/transposition.rs) - * [Trifid](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/trifid.rs) - * [Vernam](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/vernam.rs) - * [Vigenere](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/vigenere.rs) - * [XOR](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/xor.rs) - * Compression - * [Burrows-Wheeler Transform](https://github.com/TheAlgorithms/Rust/blob/master/src/compression/burrows_wheeler_transform.rs) - * [Huffman Encoding](https://github.com/TheAlgorithms/Rust/blob/master/src/compression/huffman_encoding.rs) - * [LZ77](https://github.com/TheAlgorithms/Rust/blob/master/src/compression/lz77.rs) - * [Move to Front](https://github.com/TheAlgorithms/Rust/blob/master/src/compression/move_to_front.rs) - * [Peak Signal-to-Noise Ratio](https://github.com/TheAlgorithms/Rust/blob/master/src/compression/peak_signal_to_noise_ratio.rs) - * [Run Length Encoding](https://github.com/TheAlgorithms/Rust/blob/master/src/compression/run_length_encoding.rs) - * Conversions - * [Binary to Decimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/binary_to_decimal.rs) - * [Binary to Hexadecimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/binary_to_hexadecimal.rs) - * [Binary to Octal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/binary_to_octal.rs) - * [Decimal to Binary](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/decimal_to_binary.rs) - * [Decimal to Hexadecimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/decimal_to_hexadecimal.rs) - * [Decimal to Octal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/decimal_to_octal.rs) - * [Energy](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/energy.rs) - * [Hexadecimal to Binary](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/hexadecimal_to_binary.rs) - * [Hexadecimal to Decimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/hexadecimal_to_decimal.rs) - * [Hexadecimal to Octal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/hexadecimal_to_octal.rs) - * [IPv4 Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/ipv4_conversion.rs) - * [Length Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/length_conversion.rs) - * [Octal to Binary](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/octal_to_binary.rs) - * [Octal to Decimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/octal_to_decimal.rs) - * [Octal to Hexadecimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/octal_to_hexadecimal.rs) - * [Order of Magnitude Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/order_of_magnitude_conversion.rs) - * [Pressure](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/pressure.rs) - * [Rectangular to Polar](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/rectangular_to_polar.rs) - * [RGB-CMYK Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/rgb_cmyk_conversion.rs) - * [RGB-HSV Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/rgb_hsv_conversion.rs) - * [Roman Numerals](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/roman_numerals.rs) - * [Speed](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/speed.rs) - * [Time](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/time.rs) - * [Temperature](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/temperature.rs) - * [Volume](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/volume.rs) - * [Weight](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/weight.rs) - * Data Structures - * [AVL Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/avl_tree.rs) - * [B-Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/b_tree.rs) - * [Binary Search Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/binary_search_tree.rs) - * [Fenwick Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/fenwick_tree.rs) - * [Floyds Algorithm](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/floyds_algorithm.rs) - * [Graph](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/graph.rs) - * [Hash Table](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/hash_table.rs) - * [Heap](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/heap.rs) - * [Lazy Segment Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/lazy_segment_tree.rs) - * [Linked List](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/linked_list.rs) - * Probabilistic - * [Bloom Filter](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/probabilistic/bloom_filter.rs) - * [Count Min Sketch](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/probabilistic/count_min_sketch.rs) - * [Queue](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/queue.rs) - * [Range Minimum Query](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/range_minimum_query.rs) - * [RB Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/rb_tree.rs) - * [Segment Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/segment_tree.rs) - * [Segment Tree Recursive](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/segment_tree_recursive.rs) - * [Stack Using Singly Linked List](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/stack_using_singly_linked_list.rs) - * [Treap](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/treap.rs) - * [Trie](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/trie.rs) - * [Union Find](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/union_find.rs) - * [Veb Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/veb_tree.rs) - * Dynamic Programming - * [Catalan Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/catalan_numbers.rs) - * [Coin Change](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/coin_change.rs) - * [Egg Dropping](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/egg_dropping.rs) - * [Fibonacci](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/fibonacci.rs) - * [Fractional Knapsack](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/fractional_knapsack.rs) - * [Integer Partition](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/integer_partition.rs) - * [Is Subsequence](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/is_subsequence.rs) - * [Knapsack](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/knapsack.rs) - * [Longest Common Subsequence](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/longest_common_subsequence.rs) - * [Longest Common Substring](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/longest_common_substring.rs) - * [Longest Continuous Increasing Subsequence](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/longest_continuous_increasing_subsequence.rs) - * [Longest Increasing Subsequence](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/longest_increasing_subsequence.rs) - * [Matrix Chain Multiply](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/matrix_chain_multiply.rs) - * [Maximal Square](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/maximal_square.rs) - * [Maximum Subarray](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/maximum_subarray.rs) - * [Minimum Cost Path](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/minimum_cost_path.rs) - * [Optimal BST](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/optimal_bst.rs) - * [Palindrome Partitioning](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/palindrome_partitioning.rs) - * [Rod Cutting](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/rod_cutting.rs) - * [Smith-Waterman](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/smith_waterman.rs) - * [Snail](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/snail.rs) - * [Subset Generation](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/subset_generation.rs) - * [Subset Sum](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/subset_sum.rs) - * [Task Assignment](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/task_assignment.rs) - * [Trapped Rainwater](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/trapped_rainwater.rs) - * [Word Break](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/word_break.rs) - * Financial - * [Depreciation](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/depreciation.rs) - * [Equated Monthly Installments](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/equated_monthly_installments.rs) - * [Exponential Moving Average](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/exponential_moving_average.rs) - * [Finance Ratios](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/finance_ratios.rs) - * [Interest](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/interest.rs) - * [Net Present Value](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/npv.rs) - * [NPV Sensitivity](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/npv_sensitivity.rs) - * [Payback Period](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/payback.rs) - * [Present Value](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/present_value.rs) - * [Treynor Ratio](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/treynor_ratio.rs) - * General - * [Convex Hull](https://github.com/TheAlgorithms/Rust/blob/master/src/general/convex_hull.rs) - * [Fisher Yates Shuffle](https://github.com/TheAlgorithms/Rust/blob/master/src/general/fisher_yates_shuffle.rs) - * [Genetic](https://github.com/TheAlgorithms/Rust/blob/master/src/general/genetic.rs) - * [Hanoi](https://github.com/TheAlgorithms/Rust/blob/master/src/general/hanoi.rs) - * [Huffman Encoding](https://github.com/TheAlgorithms/Rust/blob/master/src/general/huffman_encoding.rs) - * [Kadane Algorithm](https://github.com/TheAlgorithms/Rust/blob/master/src/general/kadane_algorithm.rs) - * [K-Means](https://github.com/TheAlgorithms/Rust/blob/master/src/general/kmeans.rs) - * [Mex](https://github.com/TheAlgorithms/Rust/blob/master/src/general/mex.rs) - * Permutations - * [Heap](https://github.com/TheAlgorithms/Rust/blob/master/src/general/permutations/heap.rs) - * [Naive](https://github.com/TheAlgorithms/Rust/blob/master/src/general/permutations/naive.rs) - * [Steinhaus Johnson Trotter](https://github.com/TheAlgorithms/Rust/blob/master/src/general/permutations/steinhaus_johnson_trotter.rs) - * [Subarray Sum Equals K](https://github.com/TheAlgorithms/Rust/blob/master/src/general/subarray_sum_equals_k.rs) - * [Two Sum](https://github.com/TheAlgorithms/Rust/blob/master/src/general/two_sum.rs) - * Geometry - * [Closest Points](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/closest_points.rs) - * [Graham Scan](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/graham_scan.rs) - * [Jarvis Scan](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/jarvis_scan.rs) - * [Point](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/point.rs) - * [Polygon Points](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/polygon_points.rs) - * [Ramer Douglas Peucker](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/ramer_douglas_peucker.rs) - * [Segment](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/segment.rs) - * Graph - * [A*](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/astar.rs) - * [Ant Colony Optimization](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/ant_colony_optimization.rs) - * [Bellman-Ford](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/bellman_ford.rs) - * [Bipartite Matching](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/bipartite_matching.rs) - * [Breadth First Search](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/breadth_first_search.rs) - * [Centroid Decomposition](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/centroid_decomposition.rs) - * [Decremental Connectivity](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/decremental_connectivity.rs) - * [Depth First Search](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/depth_first_search.rs) - * [Depth First Search Tic-Tac-Toe](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/depth_first_search_tic_tac_toe.rs) - * [Detect Cycle](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/detect_cycle.rs) - * [Dijkstra](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/dijkstra.rs) - * [Dinic Maxflow](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/dinic_maxflow.rs) - * [Disjoint Set Union](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/disjoint_set_union.rs) - * [Eulerian Path](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/eulerian_path.rs) - * [Floyd Warshall](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/floyd_warshall.rs) - * [Ford Fulkerson](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/ford_fulkerson.rs) - * [Graph Enumeration](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/graph_enumeration.rs) - * [Heavy Light Decomposition](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/heavy_light_decomposition.rs) - * [Kosaraju](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/kosaraju.rs) - * [Lee Breadth First Search](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/lee_breadth_first_search.rs) - * [Lowest Common Ancestor](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/lowest_common_ancestor.rs) - * [Minimum Spanning Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/minimum_spanning_tree.rs) - * [Page Rank](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/page_rank.rs) - * [Prim](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/prim.rs) - * [Prufer Code](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/prufer_code.rs) - * [Strongly Connected Components](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/strongly_connected_components.rs) - * [Tarjans Strongly Connected Components](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/tarjans_ssc.rs) - * [Topological Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/topological_sort.rs) - * [Two Satisfiability](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/two_satisfiability.rs) - * Greedy - * [Job Sequencing](https://github.com/TheAlgorithms/Rust/blob/master/src/greedy/job_sequencing.rs) - * [Minimum Coin Change](https://github.com/TheAlgorithms/Rust/blob/master/src/greedy/minimum_coin_changes.rs) - * [Smallest Range](https://github.com/TheAlgorithms/Rust/blob/master/src/greedy/smallest_range.rs) - * [Stable Matching](https://github.com/TheAlgorithms/Rust/blob/master/src/greedy/stable_matching.rs) - * Hashing - * [Blake2B](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/blake2b.rs) - * [Fletcher](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/fletcher.rs) - * [Hashing Traits](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/hashing_traits.rs) - * [MD5](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/md5.rs) - * [SHA-1](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/sha1.rs) - * [SHA-2](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/sha2.rs) - * [SHA-3](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/sha3.rs) - * [Lib](https://github.com/TheAlgorithms/Rust/blob/master/src/lib.rs) - * Machine Learning - * [Cholesky](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/cholesky.rs) - * [Decision Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/decision_tree.rs) - * [K-Means](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/k_means.rs) - * [K-Nearest Neighbors](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/k_nearest_neighbors.rs) - * [Linear Regression](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/linear_regression.rs) - * [Logistic Regression](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/logistic_regression.rs) - * [Naive Bayes](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/naive_bayes.rs) - * [Perceptron](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/perceptron.rs) - * [Principal Component Analysis](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/principal_component_analysis.rs) - * [Random Forest](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/random_forest.rs) - * [Support Vector Classifier](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/support_vector_classifier.rs) - * Loss Function - * [Average Margin Ranking Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/average_margin_ranking_loss.rs) - * [Hinge Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/hinge_loss.rs) - * [Huber Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/huber_loss.rs) - * [KL Divergence Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/kl_divergence_loss.rs) - * [Mean Absolute Error Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/mean_absolute_error_loss.rs) - * [Mean Squared Error Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/mean_squared_error_loss.rs) - * [Negative Log Likelihood](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/negative_log_likelihood.rs) - * Optimization - * [Adam](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/optimization/adam.rs) - * [Gradient Descent](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/optimization/gradient_descent.rs) - * [Momentum](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/optimization/momentum.rs) - * Math - * [Absolute](https://github.com/TheAlgorithms/Rust/blob/master/src/math/abs.rs) - * [Aliquot Sum](https://github.com/TheAlgorithms/Rust/blob/master/src/math/aliquot_sum.rs) - * [Amicable Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/amicable_numbers.rs) - * [Area of Polygon](https://github.com/TheAlgorithms/Rust/blob/master/src/math/area_of_polygon.rs) - * [Area Under Curve](https://github.com/TheAlgorithms/Rust/blob/master/src/math/area_under_curve.rs) - * [Armstrong Number](https://github.com/TheAlgorithms/Rust/blob/master/src/math/armstrong_number.rs) - * [Average](https://github.com/TheAlgorithms/Rust/blob/master/src/math/average.rs) - * [Baby Step Giant Step](https://github.com/TheAlgorithms/Rust/blob/master/src/math/baby_step_giant_step.rs) - * [Bell Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/bell_numbers.rs) - * [Binary Exponentiation](https://github.com/TheAlgorithms/Rust/blob/master/src/math/binary_exponentiation.rs) - * [Binomial Coefficient](https://github.com/TheAlgorithms/Rust/blob/master/src/math/binomial_coefficient.rs) - * [Catalan Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/catalan_numbers.rs) - * [Ceil](https://github.com/TheAlgorithms/Rust/blob/master/src/math/ceil.rs) - * [Chinese Remainder Theorem](https://github.com/TheAlgorithms/Rust/blob/master/src/math/chinese_remainder_theorem.rs) - * [Collatz Sequence](https://github.com/TheAlgorithms/Rust/blob/master/src/math/collatz_sequence.rs) - * [Combinations](https://github.com/TheAlgorithms/Rust/blob/master/src/math/combinations.rs) - * [Cross Entropy Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/math/cross_entropy_loss.rs) - * [Decimal to Fraction](https://github.com/TheAlgorithms/Rust/blob/master/src/math/decimal_to_fraction.rs) - * [Doomsday](https://github.com/TheAlgorithms/Rust/blob/master/src/math/doomsday.rs) - * [Elliptic Curve](https://github.com/TheAlgorithms/Rust/blob/master/src/math/elliptic_curve.rs) - * [Euclidean Distance](https://github.com/TheAlgorithms/Rust/blob/master/src/math/euclidean_distance.rs) - * [Exponential Linear Unit](https://github.com/TheAlgorithms/Rust/blob/master/src/math/exponential_linear_unit.rs) - * [Extended Euclidean Algorithm](https://github.com/TheAlgorithms/Rust/blob/master/src/math/extended_euclidean_algorithm.rs) - * [Factorial](https://github.com/TheAlgorithms/Rust/blob/master/src/math/factorial.rs) - * [Factors](https://github.com/TheAlgorithms/Rust/blob/master/src/math/factors.rs) - * [Fast Fourier Transform](https://github.com/TheAlgorithms/Rust/blob/master/src/math/fast_fourier_transform.rs) - * [Fast Power](https://github.com/TheAlgorithms/Rust/blob/master/src/math/fast_power.rs) - * [Faster Perfect Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/faster_perfect_numbers.rs) - * [Field](https://github.com/TheAlgorithms/Rust/blob/master/src/math/field.rs) - * [Frizzy Number](https://github.com/TheAlgorithms/Rust/blob/master/src/math/frizzy_number.rs) - * [Gaussian Elimination](https://github.com/TheAlgorithms/Rust/blob/master/src/math/gaussian_elimination.rs) - * [Gaussian Error Linear Unit](https://github.com/TheAlgorithms/Rust/blob/master/src/math/gaussian_error_linear_unit.rs) - * [GCD of N Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/gcd_of_n_numbers.rs) - * [Geometric Series](https://github.com/TheAlgorithms/Rust/blob/master/src/math/geometric_series.rs) - * [Greatest Common Divisor](https://github.com/TheAlgorithms/Rust/blob/master/src/math/greatest_common_divisor.rs) - * [Huber Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/math/huber_loss.rs) - * [Infix to Postfix](https://github.com/TheAlgorithms/Rust/blob/master/src/math/infix_to_postfix.rs) - * [Interest](https://github.com/TheAlgorithms/Rust/blob/master/src/math/interest.rs) - * [Interpolation](https://github.com/TheAlgorithms/Rust/blob/master/src/math/interpolation.rs) - * [Interquartile Range](https://github.com/TheAlgorithms/Rust/blob/master/src/math/interquartile_range.rs) - * [Karatsuba Multiplication](https://github.com/TheAlgorithms/Rust/blob/master/src/math/karatsuba_multiplication.rs) - * [LCM of N Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/lcm_of_n_numbers.rs) - * [Leaky Relu](https://github.com/TheAlgorithms/Rust/blob/master/src/math/leaky_relu.rs) - * [Least Square Approx](https://github.com/TheAlgorithms/Rust/blob/master/src/math/least_square_approx.rs) - * [Linear Sieve](https://github.com/TheAlgorithms/Rust/blob/master/src/math/linear_sieve.rs) - * [Logarithm](https://github.com/TheAlgorithms/Rust/blob/master/src/math/logarithm.rs) - * [Lucas Series](https://github.com/TheAlgorithms/Rust/blob/master/src/math/lucas_series.rs) - * [Matrix Ops](https://github.com/TheAlgorithms/Rust/blob/master/src/math/matrix_ops.rs) - * [Mersenne Primes](https://github.com/TheAlgorithms/Rust/blob/master/src/math/mersenne_primes.rs) - * [Miller Rabin](https://github.com/TheAlgorithms/Rust/blob/master/src/math/miller_rabin.rs) - * [Modular Exponential](https://github.com/TheAlgorithms/Rust/blob/master/src/math/modular_exponential.rs) - * [Newton Raphson](https://github.com/TheAlgorithms/Rust/blob/master/src/math/newton_raphson.rs) - * [N-th prime](https://github.com/TheAlgorithms/Rust/blob/master/src/math/nthprime.rs) - * [Pascal Triangle](https://github.com/TheAlgorithms/Rust/blob/master/src/math/pascal_triangle.rs) - * [Perfect Cube](https://github.com/TheAlgorithms/Rust/blob/master/src/math/perfect_cube.rs) - * [Perfect Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/perfect_numbers.rs) - * [Perfect Square](https://github.com/TheAlgorithms/Rust/blob/master/src/math/perfect_square.rs) - * [Pollard Rho](https://github.com/TheAlgorithms/Rust/blob/master/src/math/pollard_rho.rs) - * [Postfix Evaluation](https://github.com/TheAlgorithms/Rust/blob/master/src/math/postfix_evaluation.rs) - * [Prime Check](https://github.com/TheAlgorithms/Rust/blob/master/src/math/prime_check.rs) - * [Prime Factors](https://github.com/TheAlgorithms/Rust/blob/master/src/math/prime_factors.rs) - * [Prime Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/prime_numbers.rs) - * [Quadratic Residue](https://github.com/TheAlgorithms/Rust/blob/master/src/math/quadratic_residue.rs) - * [Random](https://github.com/TheAlgorithms/Rust/blob/master/src/math/random.rs) - * [ReLU](https://github.com/TheAlgorithms/Rust/blob/master/src/math/relu.rs) - * [Sieve of Eratosthenes](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sieve_of_eratosthenes.rs) - * [Sigmoid](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sigmoid.rs) - * [Signum](https://github.com/TheAlgorithms/Rust/blob/master/src/math/signum.rs) - * [Simpsons Integration](https://github.com/TheAlgorithms/Rust/blob/master/src/math/simpsons_integration.rs) - * [Softmax](https://github.com/TheAlgorithms/Rust/blob/master/src/math/softmax.rs) - * [Sprague Grundy Theorem](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sprague_grundy_theorem.rs) - * [Square Pyramidal Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/square_pyramidal_numbers.rs) - * [Square Root](https://github.com/TheAlgorithms/Rust/blob/master/src/math/square_root.rs) - * [Sum of Digits](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sum_of_digits.rs) - * [Sum of Geometric Progression](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sum_of_geometric_progression.rs) - * [Sum of Harmonic Series](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sum_of_harmonic_series.rs) - * [Sylvester Sequence](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sylvester_sequence.rs) - * [Tanh](https://github.com/TheAlgorithms/Rust/blob/master/src/math/tanh.rs) - * [Trapezoidal Integration](https://github.com/TheAlgorithms/Rust/blob/master/src/math/trapezoidal_integration.rs) - * [Trial Division](https://github.com/TheAlgorithms/Rust/blob/master/src/math/trial_division.rs) - * [Trig Functions](https://github.com/TheAlgorithms/Rust/blob/master/src/math/trig_functions.rs) - * [Vector Cross Product](https://github.com/TheAlgorithms/Rust/blob/master/src/math/vector_cross_product.rs) - * [Zellers Congruence Algorithm](https://github.com/TheAlgorithms/Rust/blob/master/src/math/zellers_congruence_algorithm.rs) - * Navigation - * [Bearing](https://github.com/TheAlgorithms/Rust/blob/master/src/navigation/bearing.rs) - * [Haversine](https://github.com/TheAlgorithms/Rust/blob/master/src/navigation/haversine.rs) - * [Rhumbline](https://github.com/TheAlgorithms/Rust/blob/master/src/navigation/rhumbline.rs) - * Number Theory - * [Compute Totient](https://github.com/TheAlgorithms/Rust/blob/master/src/number_theory/compute_totient.rs) - * [Euler Totient](https://github.com/TheAlgorithms/Rust/blob/master/src/number_theory/euler_totient.rs) - * [K-th Factor](https://github.com/TheAlgorithms/Rust/blob/master/src/number_theory/kth_factor.rs) - * Searching - * [Binary Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/binary_search.rs) - * [Binary Search Recursive](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/binary_search_recursive.rs) - * [Exponential Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/exponential_search.rs) - * [Fibonacci Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/fibonacci_search.rs) - * [Interpolation Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/interpolation_search.rs) - * [Jump Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/jump_search.rs) - * [K-th Smallest](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/kth_smallest.rs) - * [K-th Smallest Heap](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/kth_smallest_heap.rs) - * [Linear Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/linear_search.rs) - * [Moore Voting](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/moore_voting.rs) - * [Quick Select](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/quick_select.rs) - * [Saddleback Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/saddleback_search.rs) - * [Ternary Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/ternary_search.rs) - * [Ternary Search Min Max](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/ternary_search_min_max.rs) - * [Ternary Search Min Max Recursive](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/ternary_search_min_max_recursive.rs) - * [Ternary Search Recursive](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/ternary_search_recursive.rs) - * Signal Analysis - * [YIN](https://github.com/TheAlgorithms/Rust/blob/master/src/signal_analysis/yin.rs) - * Sorting - * [Bead Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/bead_sort.rs) - * [Binary Insertion Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/binary_insertion_sort.rs) - * [Bingo Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/bingo_sort.rs) - * [Bitonic Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/bitonic_sort.rs) - * [Bogo Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/bogo_sort.rs) - * [Bubble Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/bubble_sort.rs) - * [Bucket Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/bucket_sort.rs) - * [Cocktail Shaker Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/cocktail_shaker_sort.rs) - * [Comb Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/comb_sort.rs) - * [Counting Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/counting_sort.rs) - * [Cycle Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/cycle_sort.rs) - * [Dutch National Flag Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/dutch_national_flag_sort.rs) - * [Exchange Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/exchange_sort.rs) - * [Gnome Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/gnome_sort.rs) - * [Heap Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/heap_sort.rs) - * [Insertion Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/insertion_sort.rs) - * [Intro Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/intro_sort.rs) - * [Merge Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/merge_sort.rs) - * [Odd Even Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/odd_even_sort.rs) - * [Pancake Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/pancake_sort.rs) - * [Patience Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/patience_sort.rs) - * [Pigeonhole Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/pigeonhole_sort.rs) - * [Quick Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/quick_sort.rs) - * [Quick Sort 3-ways](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/quick_sort_3_ways.rs) - * [Radix Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/radix_sort.rs) - * [Selection Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/selection_sort.rs) - * [Shell Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/shell_sort.rs) - * [Sleep Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/sleep_sort.rs) - * [Sort Utils](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/sort_utils.rs) - * [Stooge Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/stooge_sort.rs) - * [Strand Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/strand_sort.rs) - * [Tim Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/tim_sort.rs) - * [Tournament Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/tournament_sort.rs) - * [Tree Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/tree_sort.rs) - * [Wave Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/wave_sort.rs) - * [Wiggle Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/wiggle_sort.rs) - * String - * [Aho Corasick](https://github.com/TheAlgorithms/Rust/blob/master/src/string/aho_corasick.rs) - * [Anagram](https://github.com/TheAlgorithms/Rust/blob/master/src/string/anagram.rs) - * [Autocomplete Using Trie](https://github.com/TheAlgorithms/Rust/blob/master/src/string/autocomplete_using_trie.rs) - * [Boyer Moore Search](https://github.com/TheAlgorithms/Rust/blob/master/src/string/boyer_moore_search.rs) - * [Burrows Wheeler Transform](https://github.com/TheAlgorithms/Rust/blob/master/src/string/burrows_wheeler_transform.rs) - * [Duval Algorithm](https://github.com/TheAlgorithms/Rust/blob/master/src/string/duval_algorithm.rs) - * [Hamming Distance](https://github.com/TheAlgorithms/Rust/blob/master/src/string/hamming_distance.rs) - * [Isogram](https://github.com/TheAlgorithms/Rust/blob/master/src/string/isogram.rs) - * [Isomorphism](https://github.com/TheAlgorithms/Rust/blob/master/src/string/isomorphism.rs) - * [Jaro Winkler Distance](https://github.com/TheAlgorithms/Rust/blob/master/src/string/jaro_winkler_distance.rs) - * [Knuth Morris Pratt](https://github.com/TheAlgorithms/Rust/blob/master/src/string/knuth_morris_pratt.rs) - * [Levenshtein Distance](https://github.com/TheAlgorithms/Rust/blob/master/src/string/levenshtein_distance.rs) - * [Lipogram](https://github.com/TheAlgorithms/Rust/blob/master/src/string/lipogram.rs) - * [Manacher](https://github.com/TheAlgorithms/Rust/blob/master/src/string/manacher.rs) - * [Palindrome](https://github.com/TheAlgorithms/Rust/blob/master/src/string/palindrome.rs) - * [Pangram](https://github.com/TheAlgorithms/Rust/blob/master/src/string/pangram.rs) - * [Rabin Karp](https://github.com/TheAlgorithms/Rust/blob/master/src/string/rabin_karp.rs) - * [Reverse](https://github.com/TheAlgorithms/Rust/blob/master/src/string/reverse.rs) - * [Run Length Encoding](https://github.com/TheAlgorithms/Rust/blob/master/src/string/run_length_encoding.rs) - * [Shortest Palindrome](https://github.com/TheAlgorithms/Rust/blob/master/src/string/shortest_palindrome.rs) - * [Suffix Array](https://github.com/TheAlgorithms/Rust/blob/master/src/string/suffix_array.rs) - * [Suffix Array Manber Myers](https://github.com/TheAlgorithms/Rust/blob/master/src/string/suffix_array_manber_myers.rs) - * [Suffix Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/string/suffix_tree.rs) - * [Z Algorithm](https://github.com/TheAlgorithms/Rust/blob/master/src/string/z_algorithm.rs) + +- Backtracking + - [All Combinations of Size K](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/all_combination_of_size_k.rs) + - [Graph Coloring](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/graph_coloring.rs) + - [Hamiltonian Cycle](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/hamiltonian_cycle.rs) + - [Knight Tour](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/knight_tour.rs) + - [N-Queens](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/n_queens.rs) + - [Parentheses Generator](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/parentheses_generator.rs) + - [Permutations](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/permutations.rs) + - [Rat in Maze](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/rat_in_maze.rs) + - [Subset Sum](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/subset_sum.rs) + - [Sudoku](https://github.com/TheAlgorithms/Rust/blob/master/src/backtracking/sudoku.rs) +- Big Integer + - [Fast Factorial](https://github.com/TheAlgorithms/Rust/blob/master/src/big_integer/fast_factorial.rs) + - [Multiply](https://github.com/TheAlgorithms/Rust/blob/master/src/big_integer/multiply.rs) + - [Poly1305](https://github.com/TheAlgorithms/Rust/blob/master/src/big_integer/poly1305.rs) +- Bit Manipulation + - [Binary Coded Decimal](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/binary_coded_decimal.rs) + - [Binary Shifts](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/binary_shifts.rs) + - [Counting Bits](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/counting_bits.rs) + - [Hamming Distance](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/hamming_distance.rs) + - [Highest Set Bit](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/highest_set_bit.rs) + - [Is Power of Two](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/is_power_of_two.rs) + - [Missing Number](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/find_missing_number.rs) + - [N Bits Gray Code](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/n_bits_gray_code.rs) + - [Previous Power of Two](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/find_previous_power_of_two.rs) + - [Reverse Bits](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/reverse_bits.rs) + - [Rightmost Set Bit](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/rightmost_set_bit.rs) + - [Sum of Two Integers](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/sum_of_two_integers.rs) + - [Swap Odd and Even Bits](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/swap_odd_even_bits.rs) + - [Trailing Zeros](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/binary_count_trailing_zeros.rs) + - [Two's Complement](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/twos_complement.rs) + - [Unique Number](https://github.com/TheAlgorithms/Rust/blob/master/src/bit_manipulation/find_unique_number.rs) +- Ciphers + - [AES](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/aes.rs) + - [Affine Cipher](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/affine_cipher.rs) + - [Another ROT13](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/another_rot13.rs) + - [Baconian Cipher](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/baconian_cipher.rs) + - [Base16](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/base16.rs) + - [Base32](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/base32.rs) + - [Base64](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/base64.rs) + - [Base85](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/base85.rs) + - [Caesar](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/caesar.rs) + - [Chacha](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/chacha.rs) + - [Diffie-Hellman](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/diffie_hellman.rs) + - [Hill Cipher](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/hill_cipher.rs) + - [Kernighan](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/kernighan.rs) + - [Morse Code](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/morse_code.rs) + - [Polybius](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/polybius.rs) + - [Rail Fence](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/rail_fence.rs) + - [ROT13](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/rot13.rs) + - [RSA Cipher](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/rsa_cipher.rs) + - [Salsa](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/salsa.rs) + - [Tea](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/tea.rs) + - [Theoretical ROT13](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/theoretical_rot13.rs) + - [Transposition](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/transposition.rs) + - [Trifid](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/trifid.rs) + - [Vernam](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/vernam.rs) + - [Vigenere](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/vigenere.rs) + - [XOR](https://github.com/TheAlgorithms/Rust/blob/master/src/ciphers/xor.rs) +- Compression + - [Burrows-Wheeler Transform](https://github.com/TheAlgorithms/Rust/blob/master/src/compression/burrows_wheeler_transform.rs) + - [Huffman Encoding](https://github.com/TheAlgorithms/Rust/blob/master/src/compression/huffman_encoding.rs) + - [LZ77](https://github.com/TheAlgorithms/Rust/blob/master/src/compression/lz77.rs) + - [Move to Front](https://github.com/TheAlgorithms/Rust/blob/master/src/compression/move_to_front.rs) + - [Peak Signal-to-Noise Ratio](https://github.com/TheAlgorithms/Rust/blob/master/src/compression/peak_signal_to_noise_ratio.rs) + - [Run Length Encoding](https://github.com/TheAlgorithms/Rust/blob/master/src/compression/run_length_encoding.rs) +- Conversions + - [Binary to Decimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/binary_to_decimal.rs) + - [Binary to Hexadecimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/binary_to_hexadecimal.rs) + - [Binary to Octal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/binary_to_octal.rs) + - [Decimal to Binary](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/decimal_to_binary.rs) + - [Decimal to Hexadecimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/decimal_to_hexadecimal.rs) + - [Decimal to Octal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/decimal_to_octal.rs) + - [Energy](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/energy.rs) + - [Hexadecimal to Binary](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/hexadecimal_to_binary.rs) + - [Hexadecimal to Decimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/hexadecimal_to_decimal.rs) + - [Hexadecimal to Octal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/hexadecimal_to_octal.rs) + - [IPv4 Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/ipv4_conversion.rs) + - [Length Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/length_conversion.rs) + - [Octal to Binary](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/octal_to_binary.rs) + - [Octal to Decimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/octal_to_decimal.rs) + - [Octal to Hexadecimal](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/octal_to_hexadecimal.rs) + - [Order of Magnitude Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/order_of_magnitude_conversion.rs) + - [Pressure](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/pressure.rs) + - [Rectangular to Polar](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/rectangular_to_polar.rs) + - [RGB-CMYK Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/rgb_cmyk_conversion.rs) + - [RGB-HSV Conversion](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/rgb_hsv_conversion.rs) + - [Roman Numerals](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/roman_numerals.rs) + - [Speed](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/speed.rs) + - [Time](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/time.rs) + - [Temperature](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/temperature.rs) + - [Volume](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/volume.rs) + - [Weight](https://github.com/TheAlgorithms/Rust/blob/master/src/conversions/weight.rs) +- Data Structures + - [AVL Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/avl_tree.rs) + - [B-Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/b_tree.rs) + - [Binary Search Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/binary_search_tree.rs) + - [Fenwick Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/fenwick_tree.rs) + - [Floyds Algorithm](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/floyds_algorithm.rs) + - [Graph](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/graph.rs) + - [Hash Table](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/hash_table.rs) + - [Heap](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/heap.rs) + - [Lazy Segment Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/lazy_segment_tree.rs) + - [Linked List](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/linked_list.rs) + - Probabilistic + - [Bloom Filter](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/probabilistic/bloom_filter.rs) + - [Count Min Sketch](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/probabilistic/count_min_sketch.rs) + - [Queue](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/queue.rs) + - [Range Minimum Query](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/range_minimum_query.rs) + - [RB Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/rb_tree.rs) + - [Segment Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/segment_tree.rs) + - [Segment Tree Recursive](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/segment_tree_recursive.rs) + - [Stack Using Singly Linked List](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/stack_using_singly_linked_list.rs) + - [Treap](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/treap.rs) + - [Trie](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/trie.rs) + - [Union Find](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/union_find.rs) + - [Veb Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/data_structures/veb_tree.rs) +- Dynamic Programming + - [Catalan Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/catalan_numbers.rs) + - [Coin Change](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/coin_change.rs) + - [Egg Dropping](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/egg_dropping.rs) + - [Fibonacci](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/fibonacci.rs) + - [Fractional Knapsack](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/fractional_knapsack.rs) + - [Integer Partition](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/integer_partition.rs) + - [Is Subsequence](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/is_subsequence.rs) + - [Knapsack](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/knapsack.rs) + - [Longest Common Subsequence](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/longest_common_subsequence.rs) + - [Longest Common Substring](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/longest_common_substring.rs) + - [Longest Continuous Increasing Subsequence](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/longest_continuous_increasing_subsequence.rs) + - [Longest Increasing Subsequence](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/longest_increasing_subsequence.rs) + - [Matrix Chain Multiply](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/matrix_chain_multiply.rs) + - [Maximal Square](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/maximal_square.rs) + - [Maximum Subarray](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/maximum_subarray.rs) + - [Minimum Cost Path](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/minimum_cost_path.rs) + - [Optimal BST](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/optimal_bst.rs) + - [Palindrome Partitioning](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/palindrome_partitioning.rs) + - [Rod Cutting](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/rod_cutting.rs) + - [Smith-Waterman](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/smith_waterman.rs) + - [Snail](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/snail.rs) + - [Subset Generation](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/subset_generation.rs) + - [Subset Sum](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/subset_sum.rs) + - [Task Assignment](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/task_assignment.rs) + - [Trapped Rainwater](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/trapped_rainwater.rs) + - [Word Break](https://github.com/TheAlgorithms/Rust/blob/master/src/dynamic_programming/word_break.rs) +- Financial + - [Depreciation](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/depreciation.rs) + - [Equated Monthly Installments](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/equated_monthly_installments.rs) + - [Exponential Moving Average](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/exponential_moving_average.rs) + - [Finance Ratios](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/finance_ratios.rs) + - [Interest](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/interest.rs) + - [Net Present Value](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/npv.rs) + - [NPV Sensitivity](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/npv_sensitivity.rs) + - [Payback Period](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/payback.rs) + - [Present Value](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/present_value.rs) + - [Treynor Ratio](https://github.com/TheAlgorithms/Rust/blob/master/src/financial/treynor_ratio.rs) +- General + - [Convex Hull](https://github.com/TheAlgorithms/Rust/blob/master/src/general/convex_hull.rs) + - [Fisher Yates Shuffle](https://github.com/TheAlgorithms/Rust/blob/master/src/general/fisher_yates_shuffle.rs) + - [Genetic](https://github.com/TheAlgorithms/Rust/blob/master/src/general/genetic.rs) + - [Hanoi](https://github.com/TheAlgorithms/Rust/blob/master/src/general/hanoi.rs) + - [Huffman Encoding](https://github.com/TheAlgorithms/Rust/blob/master/src/general/huffman_encoding.rs) + - [Kadane Algorithm](https://github.com/TheAlgorithms/Rust/blob/master/src/general/kadane_algorithm.rs) + - [K-Means](https://github.com/TheAlgorithms/Rust/blob/master/src/general/kmeans.rs) + - [Mex](https://github.com/TheAlgorithms/Rust/blob/master/src/general/mex.rs) + - Permutations + - [Heap](https://github.com/TheAlgorithms/Rust/blob/master/src/general/permutations/heap.rs) + - [Naive](https://github.com/TheAlgorithms/Rust/blob/master/src/general/permutations/naive.rs) + - [Steinhaus Johnson Trotter](https://github.com/TheAlgorithms/Rust/blob/master/src/general/permutations/steinhaus_johnson_trotter.rs) + - [Subarray Sum Equals K](https://github.com/TheAlgorithms/Rust/blob/master/src/general/subarray_sum_equals_k.rs) + - [Two Sum](https://github.com/TheAlgorithms/Rust/blob/master/src/general/two_sum.rs) +- Geometry + - [Closest Points](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/closest_points.rs) + - [Graham Scan](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/graham_scan.rs) + - [Jarvis Scan](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/jarvis_scan.rs) + - [Point](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/point.rs) + - [Polygon Points](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/polygon_points.rs) + - [Ramer Douglas Peucker](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/ramer_douglas_peucker.rs) + - [Segment](https://github.com/TheAlgorithms/Rust/blob/master/src/geometry/segment.rs) +- Graph + - [A\*](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/astar.rs) + - [Ant Colony Optimization](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/ant_colony_optimization.rs) + - [Bellman-Ford](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/bellman_ford.rs) + - [Bipartite Matching](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/bipartite_matching.rs) + - [Breadth First Search](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/breadth_first_search.rs) + - [Centroid Decomposition](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/centroid_decomposition.rs) + - [Decremental Connectivity](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/decremental_connectivity.rs) + - [Depth First Search](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/depth_first_search.rs) + - [Depth First Search Tic-Tac-Toe](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/depth_first_search_tic_tac_toe.rs) + - [Detect Cycle](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/detect_cycle.rs) + - [Dijkstra](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/dijkstra.rs) + - [Dinic Maxflow](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/dinic_maxflow.rs) + - [Disjoint Set Union](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/disjoint_set_union.rs) + - [Eulerian Path](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/eulerian_path.rs) + - [Floyd Warshall](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/floyd_warshall.rs) + - [Ford Fulkerson](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/ford_fulkerson.rs) + - [Graph Enumeration](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/graph_enumeration.rs) + - [Heavy Light Decomposition](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/heavy_light_decomposition.rs) + - [Kosaraju](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/kosaraju.rs) + - [Lee Breadth First Search](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/lee_breadth_first_search.rs) + - [Lowest Common Ancestor](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/lowest_common_ancestor.rs) + - [Minimum Spanning Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/minimum_spanning_tree.rs) + - [Page Rank](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/page_rank.rs) + - [Prim](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/prim.rs) + - [Prufer Code](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/prufer_code.rs) + - [Strongly Connected Components](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/strongly_connected_components.rs) + - [Tarjans Strongly Connected Components](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/tarjans_ssc.rs) + - [Topological Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/topological_sort.rs) + - [Two Satisfiability](https://github.com/TheAlgorithms/Rust/blob/master/src/graph/two_satisfiability.rs) +- Greedy + - [Job Sequencing](https://github.com/TheAlgorithms/Rust/blob/master/src/greedy/job_sequencing.rs) + - [Minimum Coin Change](https://github.com/TheAlgorithms/Rust/blob/master/src/greedy/minimum_coin_changes.rs) + - [Smallest Range](https://github.com/TheAlgorithms/Rust/blob/master/src/greedy/smallest_range.rs) + - [Stable Matching](https://github.com/TheAlgorithms/Rust/blob/master/src/greedy/stable_matching.rs) +- Hashing + - [Blake2B](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/blake2b.rs) + - [Fletcher](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/fletcher.rs) + - [Hashing Traits](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/hashing_traits.rs) + - [MD5](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/md5.rs) + - [SHA-1](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/sha1.rs) + - [SHA-2](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/sha2.rs) + - [SHA-3](https://github.com/TheAlgorithms/Rust/blob/master/src/hashing/sha3.rs) +- [Lib](https://github.com/TheAlgorithms/Rust/blob/master/src/lib.rs) +- Machine Learning + - [Cholesky](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/cholesky.rs) + - [Decision Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/decision_tree.rs) + - [K-Means](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/k_means.rs) + - [K-Nearest Neighbors](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/k_nearest_neighbors.rs) + - [Linear Regression](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/linear_regression.rs) + - [Logistic Regression](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/logistic_regression.rs) + - [Naive Bayes](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/naive_bayes.rs) + - [Perceptron](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/perceptron.rs) + - [Principal Component Analysis](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/principal_component_analysis.rs) + - [Random Forest](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/random_forest.rs) + - [Support Vector Classifier](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/support_vector_classifier.rs) + - Loss Function + - [Average Margin Ranking Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/average_margin_ranking_loss.rs) + - [Hinge Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/hinge_loss.rs) + - [Huber Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/huber_loss.rs) + - [KL Divergence Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/kl_divergence_loss.rs) + - [Mean Absolute Error Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/mean_absolute_error_loss.rs) + - [Mean Squared Error Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/mean_squared_error_loss.rs) + - [Negative Log Likelihood](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/loss_function/negative_log_likelihood.rs) + - Optimization + - [Adam](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/optimization/adam.rs) + - [Gradient Descent](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/optimization/gradient_descent.rs) + - [Momentum](https://github.com/TheAlgorithms/Rust/blob/master/src/machine_learning/optimization/momentum.rs) +- Math + - [Absolute](https://github.com/TheAlgorithms/Rust/blob/master/src/math/abs.rs) + - [Aliquot Sum](https://github.com/TheAlgorithms/Rust/blob/master/src/math/aliquot_sum.rs) + - [Amicable Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/amicable_numbers.rs) + - [Area of Polygon](https://github.com/TheAlgorithms/Rust/blob/master/src/math/area_of_polygon.rs) + - [Area Under Curve](https://github.com/TheAlgorithms/Rust/blob/master/src/math/area_under_curve.rs) + - [Armstrong Number](https://github.com/TheAlgorithms/Rust/blob/master/src/math/armstrong_number.rs) + - [Average](https://github.com/TheAlgorithms/Rust/blob/master/src/math/average.rs) + - [Baby Step Giant Step](https://github.com/TheAlgorithms/Rust/blob/master/src/math/baby_step_giant_step.rs) + - [Bell Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/bell_numbers.rs) + - [Binary Exponentiation](https://github.com/TheAlgorithms/Rust/blob/master/src/math/binary_exponentiation.rs) + - [Binomial Coefficient](https://github.com/TheAlgorithms/Rust/blob/master/src/math/binomial_coefficient.rs) + - [Bisection](https://github.com/TheAlgorithms/Rust/blob/master/src/math/bisection.rs) + - [Catalan Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/catalan_numbers.rs) + - [Ceil](https://github.com/TheAlgorithms/Rust/blob/master/src/math/ceil.rs) + - [Chinese Remainder Theorem](https://github.com/TheAlgorithms/Rust/blob/master/src/math/chinese_remainder_theorem.rs) + - [Collatz Sequence](https://github.com/TheAlgorithms/Rust/blob/master/src/math/collatz_sequence.rs) + - [Combinations](https://github.com/TheAlgorithms/Rust/blob/master/src/math/combinations.rs) + - [Cross Entropy Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/math/cross_entropy_loss.rs) + - [Decimal to Fraction](https://github.com/TheAlgorithms/Rust/blob/master/src/math/decimal_to_fraction.rs) + - [Doomsday](https://github.com/TheAlgorithms/Rust/blob/master/src/math/doomsday.rs) + - [Elliptic Curve](https://github.com/TheAlgorithms/Rust/blob/master/src/math/elliptic_curve.rs) + - [Euclidean Distance](https://github.com/TheAlgorithms/Rust/blob/master/src/math/euclidean_distance.rs) + - [Exponential Linear Unit](https://github.com/TheAlgorithms/Rust/blob/master/src/math/exponential_linear_unit.rs) + - [Extended Euclidean Algorithm](https://github.com/TheAlgorithms/Rust/blob/master/src/math/extended_euclidean_algorithm.rs) + - [Factorial](https://github.com/TheAlgorithms/Rust/blob/master/src/math/factorial.rs) + - [Factors](https://github.com/TheAlgorithms/Rust/blob/master/src/math/factors.rs) + - [Fast Fourier Transform](https://github.com/TheAlgorithms/Rust/blob/master/src/math/fast_fourier_transform.rs) + - [Fast Power](https://github.com/TheAlgorithms/Rust/blob/master/src/math/fast_power.rs) + - [Faster Perfect Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/faster_perfect_numbers.rs) + - [Field](https://github.com/TheAlgorithms/Rust/blob/master/src/math/field.rs) + - [Frizzy Number](https://github.com/TheAlgorithms/Rust/blob/master/src/math/frizzy_number.rs) + - [Gaussian Elimination](https://github.com/TheAlgorithms/Rust/blob/master/src/math/gaussian_elimination.rs) + - [Gaussian Error Linear Unit](https://github.com/TheAlgorithms/Rust/blob/master/src/math/gaussian_error_linear_unit.rs) + - [GCD of N Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/gcd_of_n_numbers.rs) + - [Geometric Series](https://github.com/TheAlgorithms/Rust/blob/master/src/math/geometric_series.rs) + - [Greatest Common Divisor](https://github.com/TheAlgorithms/Rust/blob/master/src/math/greatest_common_divisor.rs) + - [Huber Loss](https://github.com/TheAlgorithms/Rust/blob/master/src/math/huber_loss.rs) + - [Infix to Postfix](https://github.com/TheAlgorithms/Rust/blob/master/src/math/infix_to_postfix.rs) + - [Interest](https://github.com/TheAlgorithms/Rust/blob/master/src/math/interest.rs) + - [Interpolation](https://github.com/TheAlgorithms/Rust/blob/master/src/math/interpolation.rs) + - [Interquartile Range](https://github.com/TheAlgorithms/Rust/blob/master/src/math/interquartile_range.rs) + - [Karatsuba Multiplication](https://github.com/TheAlgorithms/Rust/blob/master/src/math/karatsuba_multiplication.rs) + - [LCM of N Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/lcm_of_n_numbers.rs) + - [Leaky Relu](https://github.com/TheAlgorithms/Rust/blob/master/src/math/leaky_relu.rs) + - [Least Square Approx](https://github.com/TheAlgorithms/Rust/blob/master/src/math/least_square_approx.rs) + - [Linear Sieve](https://github.com/TheAlgorithms/Rust/blob/master/src/math/linear_sieve.rs) + - [Logarithm](https://github.com/TheAlgorithms/Rust/blob/master/src/math/logarithm.rs) + - [Lucas Series](https://github.com/TheAlgorithms/Rust/blob/master/src/math/lucas_series.rs) + - [Matrix Ops](https://github.com/TheAlgorithms/Rust/blob/master/src/math/matrix_ops.rs) + - [Mersenne Primes](https://github.com/TheAlgorithms/Rust/blob/master/src/math/mersenne_primes.rs) + - [Miller Rabin](https://github.com/TheAlgorithms/Rust/blob/master/src/math/miller_rabin.rs) + - [Modular Exponential](https://github.com/TheAlgorithms/Rust/blob/master/src/math/modular_exponential.rs) + - [Newton Raphson](https://github.com/TheAlgorithms/Rust/blob/master/src/math/newton_raphson.rs) + - [N-th prime](https://github.com/TheAlgorithms/Rust/blob/master/src/math/nthprime.rs) + - [Pascal Triangle](https://github.com/TheAlgorithms/Rust/blob/master/src/math/pascal_triangle.rs) + - [Perfect Cube](https://github.com/TheAlgorithms/Rust/blob/master/src/math/perfect_cube.rs) + - [Perfect Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/perfect_numbers.rs) + - [Perfect Square](https://github.com/TheAlgorithms/Rust/blob/master/src/math/perfect_square.rs) + - [Pollard Rho](https://github.com/TheAlgorithms/Rust/blob/master/src/math/pollard_rho.rs) + - [Postfix Evaluation](https://github.com/TheAlgorithms/Rust/blob/master/src/math/postfix_evaluation.rs) + - [Prime Check](https://github.com/TheAlgorithms/Rust/blob/master/src/math/prime_check.rs) + - [Prime Factors](https://github.com/TheAlgorithms/Rust/blob/master/src/math/prime_factors.rs) + - [Prime Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/prime_numbers.rs) + - [Quadratic Residue](https://github.com/TheAlgorithms/Rust/blob/master/src/math/quadratic_residue.rs) + - [Random](https://github.com/TheAlgorithms/Rust/blob/master/src/math/random.rs) + - [ReLU](https://github.com/TheAlgorithms/Rust/blob/master/src/math/relu.rs) + - [Sieve of Eratosthenes](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sieve_of_eratosthenes.rs) + - [Sigmoid](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sigmoid.rs) + - [Signum](https://github.com/TheAlgorithms/Rust/blob/master/src/math/signum.rs) + - [Simpsons Integration](https://github.com/TheAlgorithms/Rust/blob/master/src/math/simpsons_integration.rs) + - [Softmax](https://github.com/TheAlgorithms/Rust/blob/master/src/math/softmax.rs) + - [Sprague Grundy Theorem](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sprague_grundy_theorem.rs) + - [Square Pyramidal Numbers](https://github.com/TheAlgorithms/Rust/blob/master/src/math/square_pyramidal_numbers.rs) + - [Square Root](https://github.com/TheAlgorithms/Rust/blob/master/src/math/square_root.rs) + - [Sum of Digits](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sum_of_digits.rs) + - [Sum of Geometric Progression](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sum_of_geometric_progression.rs) + - [Sum of Harmonic Series](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sum_of_harmonic_series.rs) + - [Sylvester Sequence](https://github.com/TheAlgorithms/Rust/blob/master/src/math/sylvester_sequence.rs) + - [Tanh](https://github.com/TheAlgorithms/Rust/blob/master/src/math/tanh.rs) + - [Trapezoidal Integration](https://github.com/TheAlgorithms/Rust/blob/master/src/math/trapezoidal_integration.rs) + - [Trial Division](https://github.com/TheAlgorithms/Rust/blob/master/src/math/trial_division.rs) + - [Trig Functions](https://github.com/TheAlgorithms/Rust/blob/master/src/math/trig_functions.rs) + - [Vector Cross Product](https://github.com/TheAlgorithms/Rust/blob/master/src/math/vector_cross_product.rs) + - [Zellers Congruence Algorithm](https://github.com/TheAlgorithms/Rust/blob/master/src/math/zellers_congruence_algorithm.rs) +- Navigation + - [Bearing](https://github.com/TheAlgorithms/Rust/blob/master/src/navigation/bearing.rs) + - [Haversine](https://github.com/TheAlgorithms/Rust/blob/master/src/navigation/haversine.rs) + - [Rhumbline](https://github.com/TheAlgorithms/Rust/blob/master/src/navigation/rhumbline.rs) +- Number Theory + - [Compute Totient](https://github.com/TheAlgorithms/Rust/blob/master/src/number_theory/compute_totient.rs) + - [Euler Totient](https://github.com/TheAlgorithms/Rust/blob/master/src/number_theory/euler_totient.rs) + - [K-th Factor](https://github.com/TheAlgorithms/Rust/blob/master/src/number_theory/kth_factor.rs) +- Searching + - [Binary Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/binary_search.rs) + - [Binary Search Recursive](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/binary_search_recursive.rs) + - [Exponential Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/exponential_search.rs) + - [Fibonacci Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/fibonacci_search.rs) + - [Interpolation Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/interpolation_search.rs) + - [Jump Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/jump_search.rs) + - [K-th Smallest](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/kth_smallest.rs) + - [K-th Smallest Heap](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/kth_smallest_heap.rs) + - [Linear Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/linear_search.rs) + - [Moore Voting](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/moore_voting.rs) + - [Quick Select](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/quick_select.rs) + - [Saddleback Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/saddleback_search.rs) + - [Ternary Search](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/ternary_search.rs) + - [Ternary Search Min Max](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/ternary_search_min_max.rs) + - [Ternary Search Min Max Recursive](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/ternary_search_min_max_recursive.rs) + - [Ternary Search Recursive](https://github.com/TheAlgorithms/Rust/blob/master/src/searching/ternary_search_recursive.rs) +- Signal Analysis + - [YIN](https://github.com/TheAlgorithms/Rust/blob/master/src/signal_analysis/yin.rs) +- Sorting + - [Bead Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/bead_sort.rs) + - [Binary Insertion Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/binary_insertion_sort.rs) + - [Bingo Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/bingo_sort.rs) + - [Bitonic Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/bitonic_sort.rs) + - [Bogo Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/bogo_sort.rs) + - [Bubble Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/bubble_sort.rs) + - [Bucket Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/bucket_sort.rs) + - [Cocktail Shaker Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/cocktail_shaker_sort.rs) + - [Comb Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/comb_sort.rs) + - [Counting Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/counting_sort.rs) + - [Cycle Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/cycle_sort.rs) + - [Dutch National Flag Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/dutch_national_flag_sort.rs) + - [Exchange Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/exchange_sort.rs) + - [Gnome Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/gnome_sort.rs) + - [Heap Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/heap_sort.rs) + - [Insertion Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/insertion_sort.rs) + - [Intro Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/intro_sort.rs) + - [Merge Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/merge_sort.rs) + - [Odd Even Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/odd_even_sort.rs) + - [Pancake Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/pancake_sort.rs) + - [Patience Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/patience_sort.rs) + - [Pigeonhole Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/pigeonhole_sort.rs) + - [Quick Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/quick_sort.rs) + - [Quick Sort 3-ways](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/quick_sort_3_ways.rs) + - [Radix Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/radix_sort.rs) + - [Selection Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/selection_sort.rs) + - [Shell Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/shell_sort.rs) + - [Sleep Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/sleep_sort.rs) + - [Sort Utils](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/sort_utils.rs) + - [Stooge Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/stooge_sort.rs) + - [Strand Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/strand_sort.rs) + - [Tim Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/tim_sort.rs) + - [Tournament Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/tournament_sort.rs) + - [Tree Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/tree_sort.rs) + - [Wave Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/wave_sort.rs) + - [Wiggle Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/wiggle_sort.rs) +- String + - [Aho Corasick](https://github.com/TheAlgorithms/Rust/blob/master/src/string/aho_corasick.rs) + - [Anagram](https://github.com/TheAlgorithms/Rust/blob/master/src/string/anagram.rs) + - [Autocomplete Using Trie](https://github.com/TheAlgorithms/Rust/blob/master/src/string/autocomplete_using_trie.rs) + - [Boyer Moore Search](https://github.com/TheAlgorithms/Rust/blob/master/src/string/boyer_moore_search.rs) + - [Burrows Wheeler Transform](https://github.com/TheAlgorithms/Rust/blob/master/src/string/burrows_wheeler_transform.rs) + - [Duval Algorithm](https://github.com/TheAlgorithms/Rust/blob/master/src/string/duval_algorithm.rs) + - [Hamming Distance](https://github.com/TheAlgorithms/Rust/blob/master/src/string/hamming_distance.rs) + - [Isogram](https://github.com/TheAlgorithms/Rust/blob/master/src/string/isogram.rs) + - [Isomorphism](https://github.com/TheAlgorithms/Rust/blob/master/src/string/isomorphism.rs) + - [Jaro Winkler Distance](https://github.com/TheAlgorithms/Rust/blob/master/src/string/jaro_winkler_distance.rs) + - [Knuth Morris Pratt](https://github.com/TheAlgorithms/Rust/blob/master/src/string/knuth_morris_pratt.rs) + - [Levenshtein Distance](https://github.com/TheAlgorithms/Rust/blob/master/src/string/levenshtein_distance.rs) + - [Lipogram](https://github.com/TheAlgorithms/Rust/blob/master/src/string/lipogram.rs) + - [Manacher](https://github.com/TheAlgorithms/Rust/blob/master/src/string/manacher.rs) + - [Palindrome](https://github.com/TheAlgorithms/Rust/blob/master/src/string/palindrome.rs) + - [Pangram](https://github.com/TheAlgorithms/Rust/blob/master/src/string/pangram.rs) + - [Rabin Karp](https://github.com/TheAlgorithms/Rust/blob/master/src/string/rabin_karp.rs) + - [Reverse](https://github.com/TheAlgorithms/Rust/blob/master/src/string/reverse.rs) + - [Run Length Encoding](https://github.com/TheAlgorithms/Rust/blob/master/src/string/run_length_encoding.rs) + - [Shortest Palindrome](https://github.com/TheAlgorithms/Rust/blob/master/src/string/shortest_palindrome.rs) + - [Suffix Array](https://github.com/TheAlgorithms/Rust/blob/master/src/string/suffix_array.rs) + - [Suffix Array Manber Myers](https://github.com/TheAlgorithms/Rust/blob/master/src/string/suffix_array_manber_myers.rs) + - [Suffix Tree](https://github.com/TheAlgorithms/Rust/blob/master/src/string/suffix_tree.rs) + - [Z Algorithm](https://github.com/TheAlgorithms/Rust/blob/master/src/string/z_algorithm.rs) From 8c4aff8d69c58cfc63d09c7777dada9368583816 Mon Sep 17 00:00:00 2001 From: AmirSaeed AryanMehr Date: Wed, 14 Oct 2026 17:54:01 +0330 Subject: [PATCH 3/3] test(math): cover exact midpoint root in bisection --- src/math/bisection.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/math/bisection.rs b/src/math/bisection.rs index 2b26df6d0c1..1b94aac039f 100644 --- a/src/math/bisection.rs +++ b/src/math/bisection.rs @@ -221,4 +221,11 @@ mod tests { assert_eq!(root, Some(1.0)); } + + #[test] + fn finds_root_at_midpoint() { + let root = bisection(|x| x - 1.0, 0.0, 2.0, 1e-6, 100); + + assert_eq!(root, Some(1.0)); + } }