From 340d234a4f597b76c738d404af9b81ba0743b0f7 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sun, 3 Nov 2024 20:16:21 +0100 Subject: [PATCH] =?UTF-8?q?kt:=20add=20=C2=AB796.=20Rotate=20String=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit URL: https://leetcode.com/problems/rotate-string/ Signed-off-by: Matej Focko --- kt/rotate-string.kt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 kt/rotate-string.kt diff --git a/kt/rotate-string.kt b/kt/rotate-string.kt new file mode 100644 index 0000000..be46978 --- /dev/null +++ b/kt/rotate-string.kt @@ -0,0 +1,6 @@ +class Solution { + fun rotateString( + s: String, + goal: String, + ): Boolean = s.length == goal.length && (s + s).contains(goal) +}