Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alexfertel/rust-algorithms
/ functions
Functions
990 in github.com/alexfertel/rust-algorithms
⨍
Functions
990
◇
Types & classes
106
↓ 1 callers
Function
rot_word
rot_word rotates the given word to the left. # Arguments `word` - The word to rotate # Returns The rotated word
src/ciphers/aes.rs:753
↓ 1 callers
Method
search
(&self, s: &'a str)
src/string/aho_corasick.rs:64
↓ 1 callers
Function
selection_sort
(array: &mut [T])
src/sorting/selection_sort.rs:3
↓ 1 callers
Function
set_bit
Sets a specific bit in a number. Sets the bit at position `n` in `bits` to 1. see: [Set Bit](https://en.wikipedia.org/wiki/Bit_manipulation) # Argu
src/bit_manipulation/basic.rs:57
↓ 1 callers
Function
set_done
(vertex_state: &mut u64)
src/graphs/strongly_connected_components.rs:34
↓ 1 callers
Function
shell_sort
(values: &mut [T])
src/sorting/shell_sort.rs:3
↓ 1 callers
Function
shift_rows
shift_rows applies the AES ShiftRows/InvShiftRows operation to the given block. The block is modified in place. # Arguments `block` - The block to a
src/ciphers/aes.rs:627
↓ 1 callers
Method
sink
(&mut self, mut k: usize, less: fn(T, T) -> bool)
src/data_structures/heap.rs:115
↓ 1 callers
Function
solve_nq_util
Solves the nqueens problem (recursive) This function is part of the nqueens algorithms and inserts the queens at safe positions recursively. See [nq
src/general/nqueens.rs:88
↓ 1 callers
Function
sort_by_min_angle
(pts: &[(f64, f64)], min: &(f64, f64))
src/general/convex_hull.rs:3
↓ 1 callers
Function
stooge_sort
(arr: &mut [T])
src/sorting/stooge_sort.rs:19
↓ 1 callers
Function
store_sorted
Function to perform inorder traversal and store in a vector
src/sorting/tree_sort.rs:45
↓ 1 callers
Method
swim
(&mut self, mut k: usize, less: fn(T, T) -> bool)
src/data_structures/heap.rs:108
↓ 1 callers
Function
take_min
Removes the smallest node from the tree, if one exists.
src/data_structures/avl_tree.rs:288
↓ 1 callers
Function
tim_sort
(arr: &mut [T])
src/sorting/tim_sort.rs:100
↓ 1 callers
Method
traverse_node
(&self, node: &Node<T>, depth: usize)
src/data_structures/b_tree.rs:134
↓ 1 callers
Method
update
function to update a tree node
src/data_structures/segment_tree.rs:56
↓ 1 callers
Function
xor
XOR cipher # Arguments `text` - A string slice that holds the text to be ciphered. `key` - A u8 that holds the key to be used for ciphering. # Retu
src/ciphers/xor.rs:22
↓ 1 callers
Function
z_array
(input: &[T])
src/string/z_algorithm.rs:43
Function
_check_part
Check if a string is a valid morse code part. This function checks if a string contains only valid morse code characters ('.', '-', and ' '). # Argu
src/ciphers/morse_code.rs:129
Function
_decode_token
Decode a morse code token into an alphanumeric character. This function decodes a morse code token into its corresponding alphanumeric character. It
src/ciphers/morse_code.rs:209
Function
a_few_separate_matches
()
src/string/rabin_karp.rs:97
Function
a_few_separate_matches
()
src/string/knuth_morris_pratt.rs:72
Function
abr_hash
()
src/string/rabin_karp.rs:78
Function
acyclic
()
src/graphs/strongly_connected_components.rs:110
Method
add
Add `val` to the `i`-th element # Arguments `i` - The index of the element to add `val` to `val` - The value to add to the `i`-th element # Example
src/data_structures/fenwick_tree.rs:77
Method
add
(self, other: Complex64)
src/math/fast_fourier_transform.rs:47
Method
add_edge
(&mut self, edge: (&'a T, &'a T, i32))
src/data_structures/graph.rs:84
Function
almost_equal
(a: f64, b: f64, epsilon: f64)
src/math/fast_fourier_transform.rs:172
Function
almost_equal
(a: f64, b: f64, eps: f64)
src/math/simpson_integration.rs:29
Function
alternate_mutations
()
src/data_structures/stack.rs:78
Function
alternate_mutations
()
src/data_structures/queue.rs:72
Function
amount_zero
()
src/dynamic_programming/coin_change.rs:54
Function
another_rot13
Applies the ROT13 cipher to the given text. ROT13 is a simple letter substitution cipher that replaces a letter with the 13th letter after it in the
src/ciphers/another_rot13.rs:26
Function
area_under_cosine
()
src/math/simpson_integration.rs:45
Function
ascii_avalanche
()
src/ciphers/sha256.rs:212
Function
baby_step_giant_step
(a: usize, b: usize, n: usize)
src/math/baby_step_giant_step.rs:12
Function
balanced
()
src/data_structures/avl_tree.rs:499
Function
basic
()
src/string/burrows_wheeler_transform.rs:46
Function
basic
()
src/math/miller_rabin.rs:69
Function
basic
()
src/math/newton_raphson.rs:24
Function
basic
()
src/math/sieve_of_eratosthenes.rs:34
Function
basic
()
src/math/extended_euclidean_algorithm.rs:28
Function
basic
()
src/math/perfect_numbers.rs:31
Function
basic
()
src/math/trial_division.rs:41
Function
basic
()
src/math/prime_check.rs:22
Function
basic
()
src/math/prime_numbers.rs:29
Function
basic
()
src/dynamic_programming/coin_change.rs:37
Function
basics
()
src/data_structures/stack_using_singly_linked_list.rs:170
Function
bellman_ford
performs the Bellman-Ford algorithm on the given graph from the given start the graph is an undirected graph if there is a negative weighted loop it
src/graphs/bellman_ford.rs:14
Function
big_armstrong_number
()
src/math/armstrong_number.rs:41
Function
big_numbers
()
src/math/pollard_rho.rs:250
Function
binary_search_rec
( list_of_items: &[T], target: &T, left: &usize, right: &usize, )
src/searching/binary_search_recursive.rs:3
Function
bit_distance
Calculates the bit distance between two numbers. Returns the number of different bits between `a` and `b`. see: [Hamming Distance](https://en.wikipe
src/bit_manipulation/basic.rs:469
Function
bit_equivalence
Counts the number of equal bits between two numbers. Returns the number of equal bits between `a` and `b`. see: [Hamming Distance](https://en.wikipe
src/bit_manipulation/basic.rs:436
Function
block_move
()
src/graphs/depth_first_search_tic_tac_toe.rs:374
Function
block_win_move
()
src/graphs/depth_first_search_tic_tac_toe.rs:357
Function
bogo_bogo_sort
(arr: &[T])
src/sorting/bogo_bogo_sort.rs:10
Function
bra_hash
()
src/string/rabin_karp.rs:84
Function
breadth_first_search
(graph: &Graph, start: Vertex, end: Vertex)
src/graphs/breadth_first_search.rs:4
Method
build_suffix
(root: Rc<RefCell<ACNode>>)
src/string/aho_corasick.rs:32
Function
builds_pi_correctly
()
src/string/knuth_morris_pratt.rs:57
Function
burrows_wheeler_transform
(input: String)
src/string/burrows_wheeler_transform.rs:1
Function
caesar
Implements the Caesar Cipher based on cipher_crypt::caesar Rotates each ascii character by shift. The most basic example is ROT 13, which rotates 'a'
src/ciphers/caesar.rs:27
Function
caesar_rot_13
()
src/ciphers/caesar.rs:52
Function
caesar_unicode
()
src/ciphers/caesar.rs:57
Function
check_factorization
(number: u64, factors: &[u64])
src/math/pollard_rho.rs:207
Function
check_factorization
()
src/math/linear_sieve.rs:105
Function
check_is_proper_factor
(number: u64, factor: u64)
src/math/pollard_rho.rs:203
Function
check_number_of_primes
()
src/math/linear_sieve.rs:123
Function
cipolla
return two solutions (x1, x2) for Quadratic Residue problem x^2 = a (mod p), where p is an odd prime if a is Quadratic Nonresidues, return None
src/math/quadratic_residue.rs:75
Function
classical_fibonacci
classical_fibonacci(n) returns the nth fibonacci number This function uses the definition of Fibonacci where: F(0) = 0, F(1) = 1 and F(n+1) = F(n) + F
src/dynamic_programming/fibonacci.rs:47
Function
closest_points
returns the two closest points or None if there are zero or one point
src/geometry/closest_points.rs:18
Function
coin_change
Coin change via Dynamic Programming coin_change(coins, amount) returns the fewest number of coins that need to make up that amount. If that amount of
src/dynamic_programming/coin_change.rs:12
Function
coin_problem
Coin Change Problem # Algorithm The vector coins holds all types of coins. The input argument n represents the value which has to be put together wi
src/dynamic_programming/coin_problem.rs:32
Function
coins_empty
()
src/dynamic_programming/coin_change.rs:48
Function
concats
()
src/data_structures/rope.rs:253
Function
connected_dumbbell
()
src/graphs/strongly_connected_components.rs:148
Method
contains
(&self, node: &'a T)
src/data_structures/graph.rs:102
Method
contains
Checks if an element may be in the Bloom Filter NOTE: `true` implies the element may be in the set, `false` implies the element is not in the set. The
src/data_structures/bloom_filter.rs:89
Function
convex_hull_graham
If three points are aligned and are part of the convex hull then the three are kept. If one doesn't want to keep those points, it is easy to itera
src/general/convex_hull.rs:32
Function
create_acyclic_graph
()
src/graphs/disjoint_set_union.rs:49
Function
cycle
()
src/graphs/strongly_connected_components.rs:120
Function
decode_ascii
Decode a string of ints into their corresponding letters in a Polybius square. Any invalid characters, or whitespace will be ignored. # Arguments `
src/ciphers/polybius.rs:77
Function
decode_emoji
()
src/ciphers/polybius.rs:140
Function
decode_empty
()
src/ciphers/polybius.rs:135
Function
decode_odd_length
()
src/ciphers/polybius.rs:158
Function
decode_string_with_whitespace
()
src/ciphers/polybius.rs:145
Function
decode_unknown_string
()
src/ciphers/polybius.rs:153
Function
decrypt_invalid_morsecode_with_spaces
()
src/ciphers/morse_code.rs:299
Function
decrypt_valid_character_set_invalid_morsecode
()
src/ciphers/morse_code.rs:282
Function
decrypt_valid_morsecode_with_spaces
()
src/ciphers/morse_code.rs:271
Method
default
()
src/general/huffman_encoding.rs:125
Method
default
()
src/data_structures/rb_tree.rs:39
Method
default
Create a new, empty `BinarySearchTree`. # Examples ```rust use rust_algorithms::data_structures::BinarySearchTree; let tree: BinarySearchTree<i32>
src/data_structures/binary_search_tree.rs:60
Method
default
Creates an empty `AVLTree`. # Examples ```rust use rust_algorithms::data_structures::AVLTree; let tree: AVLTree<i32> = Default::default(); assert!
src/data_structures/avl_tree.rs:388
Method
default
Create a new HashTable with the default initial capacity. # Examples: ```rust use rust_algorithms::data_structures::HashTable; let hash_table: Hash
src/data_structures/hashtable.rs:53
Method
default
()
src/data_structures/stack_using_singly_linked_list.rs:93
Method
default
()
src/math/fast_fourier_transform.rs:38
Method
del_min
Deletes the minimum key in the `MinHeap`. # Returns: The minimum key in the `MinHeap`. # Panics: If the heap is empty. # Examples: ```rust use r
src/data_structures/heap.rs:438
← previous
next →
301–400 of 990, ranked by callers