题解 | #旋转字符串#

旋转字符串

http://www.nowcoder.com/practice/80b6bb8797644c83bc50ac761b72981c

import java.util.*;


public class Solution {
    /**
     * 旋转字符串
     * @param A string字符串 
     * @param B string字符串 
     * @return bool布尔型
     */
    public boolean solve (String A, String B) {
        // write code here
        return (A+A).contains(B) && (A.length()==B.length());
    }
}
全部评论
这是真的骚操作啊
点赞 回复 分享
发布于 2022-06-22 08:34
骚操作
点赞 回复 分享
发布于 2022-04-01 11:47

相关推荐

评论
6
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务