fihopzz
未读,2009年12月2日 11:30:082009/12/2登录即可回复作者
登录即可转发
您无权在此群组中删除帖子
要么此群组的电子邮件地址为匿名状态,要么您得查看成员电子邮件地址权限才能查看原始帖子
收件人 TopLanguage
The input is two strings of characters A = a1a2...an and B =
b1b2...bn.Design an O(n) algorithm to determine whether B is a cyclic
shift of A. In other words, the algorithm should determine whether
there exists an index k, 1<=k<=n such that ai = b(k+i)modn, for all i,
1<=i<=n.