String Matching
The direct algorithm tries the pattern at every position in the text and compares characters until one fails.
Costs
| Category | Algorithm |
| Difficulty | Medium |
| Time | O(n × m) |
| n and m | text length and pattern length |
| Faster methods | KMP and Rabin-Karp |
Questions
What is String Matching?
The direct algorithm tries the pattern at every position in the text and compares characters until one fails.
Where do I practice it?
DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.