[力扣] 算法 796 (C#)

796. 旋转字符串

public class Solution {
    public bool RotateString(string A, string B)
        => A.Length == B.Length && (A + A).Contains(B);
}

发表评论