JAVA_Rotate String_LeetCode 796


JAVA_Rotate String_LeetCode 796

JAVA_Rotate String_LeetCode 796 풀이 class Solution { public boolean rotateString(String s, String goal) { return s.length() == goal.length() && (s + s).contains(goal); } } * 출처 Rotate String - LeetCode Can you solve this real interview question? Rotate String - Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s. A shift on s consists of moving the leftmost character of s to the rightmost position. * For example, if s = "abcde", then it will...


#JAVA #JAVA_LeetCode796 #JAVA_RotateString #JAVA_RotateString_LeetCode796 #RotateString_LeetCode796

원문링크 : JAVA_Rotate String_LeetCode 796