LeetCode/kt/rotate-string.kt
2024-11-03 20:16:21 +01:00

6 lines
149 B
Kotlin

class Solution {
fun rotateString(
s: String,
goal: String,
): Boolean = s.length == goal.length && (s + s).contains(goal)
}