-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Add KMP string matching algorithm (#2719) #2930
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
This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions! |
#include <iostream> | ||
#include <vector> | ||
using namespace std; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
452546
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @date 2025-04-13 | ||
*/ | ||
|
||
#include <iostream> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <iostream> | |
#include <iostream> | |
- # - [ ] []()_******_ | |
```suggestion | |
#include <iostream> |
******
} | ||
|
||
if (j == m) { | ||
cout << "Pattern found at index " << i - j << endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
457
🚀 Description
This PR adds the implementation of the Knuth-Morris-Pratt (KMP) string matching algorithm under the
strings/
directory.📂 File Added
strings/kmp_string_matching.cpp
✅ Related Issue
Closes #2719
Let me know if any changes are required. Glad to contribute! ✨