Question DSA-HASH-0059
MediumIn Rabin–Karp, why is a rolling hash used?
- A.
The hash of the next window is computed in O(1) from the previous one
- B.
It sorts the text
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Hashing question
In Rabin–Karp, why is a rolling hash used?
The hash of the next window is computed in O(1) from the previous one
It sorts the text
Sign up free to see the answer and a step-by-step explanation.
It avoids all collisions
It needs no modulus