阅读背景:

【字符串】判断s2是否是s1的旋转字符串

来源:互联网 

题目
Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a rotation of s1 using only one call to isSubstring ( i.e., “waterbottle” is a rotation of “erbottlewat”). Assume you have a method isSubstrin




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: