I am reading some solutions of the problem AMSTRING (from this April’s cook off). It seems that most solutions (including setter’s one) use same loop structure like this.
for(d=1-n;d<n;d++) { .... }
I would like to know when we can use the technique like that. What’s the purpose of the method? and Could you recommend some problems about ‘sliding window’?