Skip to content

Searching algo ahocorasick string search algorithm #4724

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

Conversation

Harshit-Chordiya
Copy link

Description

  • Added Aho-Corasick String Search Algorithm and its relevant Tests
  • Use a StringBuilder for result accumulation.
  • Modify the matching method to return the number of states created.
  • Improve variable naming and add comments for clarity.
  • Added the AhoCorasickStringSearchAlgorithmTest class to work with the refactored code.
  • Create separate instances of the algorithm for each test case to ensure independence.
  • Add appropriate assertions to the test cases.

Type Of Change

Added a new Algorithm (Aho-Corasick String Search Algorithm).

Added Tests or not?

Yes, there is a separate file with 3 tests called AhoCorasickStringSearchAlgorithmTest file.

  1. testTrial 1
  2. testTrial 2
  3. testTrial 3

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.

Can you please add "Hacktoberfest" or "Hacktoberfest-accepted" label to my PR .

@vil02
Copy link
Member

vil02 commented Oct 8, 2023

There is already a PR about this algorithm - #4465.

@vil02 vil02 closed this Oct 8, 2023
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