题解 | #旋转字符串#

旋转字符串

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

相关推荐

废物一个0offer:认真的吗二本本科找人工智能岗位
点赞 评论 收藏
分享
06-23 11:28
门头沟学院 Java
牛客91966197...:也有可能是点拒绝的时候自动弹的话术
点赞 评论 收藏
分享
评论
6
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务