MCPcopy Index your code
hub / github.com/TheAlgorithms/Rust / insert

Method insert

src/data_structures/trie.rs:50–59  ·  view source on GitHub ↗

Inserts a value into the Trie, associating it with a sequence of keys. # Arguments - `key`: An iterable sequence of keys (e.g., characters in a string or integers in a vector). - `value`: The value to associate with the sequence of keys.

(&mut self, key: impl IntoIterator<Item = Key>, value: Type)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 15

subarray_sum_equals_kFunction · 0.45
get_alphabetMethod · 0.45
newMethod · 0.45
two_sumFunction · 0.45
selectMethod · 0.45
mex_using_setFunction · 0.45
permute_recurse_uniqueFunction · 0.45
decimal_to_hexadecimalFunction · 0.45
generate_codesFunction · 0.45
move_to_front_encodeFunction · 0.45
move_to_front_decodeFunction · 0.45
add_nodeMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_insert_empty_keyFunction · 0.36
test_overlapping_keysFunction · 0.36
test_partial_matchFunction · 0.36
single_vertexFunction · 0.36
single_edgeFunction · 0.36
tree_1Function · 0.36
graph_1Function · 0.36
small_treesFunction · 0.36