You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds the Naive Pattern Search algorithm implementation in Java.
The algorithm scans the text from left to right and checks each substring of
length m (pattern length) to find matches.
- New class: NaivePatternSearch.java
- Provides `search(String text, String pattern)` method returning all match indices
- Includes a sample main() for demonstration
Time Complexity: O(n * m)
Space Complexity: O(1)
0 commit comments