问答题
下列算法实现求采用顺序结构存储的串s和串t的一个最长公共子串。
void maxcomstr(order8tring*s, *t, int index,length)
(int i,j,k,lengthl,con;
index=0;length=0;i=1;
while(i<=s.1en)
{j=1;
while(j<=t.1en)
{if(S[i]_=t[j])
i k=1 ; lengthl=1 ; con=1;
while(con)
if(1) { lengthl=leng七h1+1;k=k+1; ) else(2) ;
if(1engthl>length) ( index=i; length=length1; )
(3) ;
}
else(4);
}
(5)
} }
【上海大学2000一、2(10分)】