Can someone explain to me how to solve the substring problem iteratively?
The problem: given two strings S=S1S2S
It would go something like this:
m==0? return true cs=0 ct=0 loop cs>n-m? break char at cs+ct in S==char at ct in T? yes: ct=ct+1 ct==m? return true no: ct=0 cs=cs+1 end loop return false