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

Function build_huffman_tree

src/compression/huffman_encoding.rs:134–158  ·  view source on GitHub ↗

Builds the Huffman tree from a frequency map # Arguments `frequencies` - HashMap of character frequencies # Returns The root node of the Huffman tree, or None if input is empty

(frequencies: HashMap<char, usize>)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

huffman_encodeFunction · 0.85

Calls 5

HeapNodeClass · 0.85
pushMethod · 0.80
is_emptyMethod · 0.45
lenMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected