Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rabin-Karp searching algorithm #762

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

Lelenadamtew
Copy link
Contributor

Rabin-Karp Algorithm
The Rabin-Karp algorithm efficiently searches for a pattern in a text using a rolling hash function. It computes hash values for the pattern and substrings of the text, comparing hashes to find matches. If the hash values match, the algorithm verifies the characters to confirm the match.
Key Features:

  • Efficient for multiple pattern searches.
  • Utilizes a rolling hash for constant-time substring hash updates.
  • Handles large texts with reduced hash collisions using a prime modulus.

@gantavyamalviya gantavyamalviya merged commit 9063354 into codemistic:main Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants