struct candidate{
start position;
current position;
int length;
}
扫一遍长字符串M,
if(M[i]==N[0]) open a new candidate, candidate.startPosition=i; candidate.
currentPosition=0;
else{
for each candidate{
if(M[i]==N[candidate.currentPosition+1])
candidate.currentPosition++;
if(candidate.currentPosition==n-1)
candidate.length=i-candidate.startPosition;
}
find the candidate with shortest length;