Can someone explain to me how to solve the substring problem iteratively?
The problem: given two strings S=S1S2S
Here's a list of string searching algorithms
Depending on your needs, a different algorithm may be a better fit, but Boyer-Moore is a popular choice.