Question DSA-STR-0068
HardWhy does Rabin–Karp have O(nm) worst-case time?
- A.
It sorts the text
- B.
Its hash takes O(m) to update
- C.
It uses recursion
- D.
Many hash collisions force character-by-character checks at many positions
Sign up free to see the answer and a step-by-step explanation.