Rabin-Karp (RK) algorithm (Single String Search String Search)

From Algorithm Wiki
Revision as of 10:33, 15 February 2023 by Admin (talk | contribs) (Created page with "== Time Complexity == $O(mn)$ == Space Complexity == $O({1})$ words (Derived: only storing a rolling hash) == Description == Hashing-based, compare the text and patterns via their hash functions == Approximate? == Exact == Randomized? == No, deterministic == Model of Computation == Word RAM == Year == 1987 == Reference == https://pdfs.semanticscholar.org/c47d/151f09c567013761632c89e237431c6291a2.pdf")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Time Complexity

$O(mn)$

Space Complexity

$O({1})$ words

(Derived: only storing a rolling hash)

Description

Hashing-based, compare the text and patterns via their hash functions

Approximate?

Exact

Randomized?

No, deterministic

Model of Computation

Word RAM

Year

1987

Reference

https://pdfs.semanticscholar.org/c47d/151f09c567013761632c89e237431c6291a2.pdf