MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / compute_hash

Function compute_hash

src/string/rabin_karp.rs:51–57  ·  view source on GitHub ↗

Calculates the hash of a string using the Rabin-Karp formula. # Arguments `s` - The string to calculate the hash for. # Returns The hash value of the string modulo `MOD`.

(s: &str)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

rabin_karpFunction · 0.85

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected