第二周作业
2015-03-15 17:11:10 2 举报
第二周作业
作者其他创作
大纲/内容
false
return rtnIndex
iPat ++;
final int NotFound = -1;int iSub = 0;returnIndex = NotFound;boolean isPat = false;int subjectLen = subject.length;int patternLen = pattern.length;
true
if (subject[iSub + iPat] != pattern[iPat])
end
begin
if (subject[iSub] == pattern[0])
if (iPat patternLen)
rtnIndex = NotFound;isPat = false;break;
rtnIndex=iSub; isPat=true;int iPat = 1;
iSub++;
while (isPat == false && isSub + patternLen -1 subjectLen)
0 条评论
下一页