-
-
Notifications
You must be signed in to change notification settings - Fork 49.6k
Closed
Description
Your Rabin-Karp algorithm uses python default hash function which is not using rolling hash property that allows to compute hash of next string effectively for constant time. Because of this property RK-algo works for O(n) in average case (when collisions for hash of part of s and hash for pattern don't happen so often). It would be better to improve this implementation.
Metadata
Metadata
Assignees
Labels
No labels