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

Function rabin_karp

src/string/rabin_karp.rs:16–42  ·  view source on GitHub ↗

Finds all starting indices where the `pattern` appears in the `text`. # Arguments `text` - The string where the search is performed. `pattern` - The substring pattern to search for. # Returns A vector of starting indices where the pattern is found.

(text: &str, pattern: &str)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 5

compute_hashFunction · 0.85
update_hashFunction · 0.85
pushMethod · 0.80
is_emptyMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected