You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h2><ahref="https://leetcode.com/problems/rotate-string/">796. Rotate String</a></h2><h3>Easy</h3><hr><div><p>Given two strings <code>s</code> and <code>goal</code>, return <code>true</code> <em>if and only if</em> <code>s</code> <em>can become</em> <code>goal</code> <em>after some number of <strong>shifts</strong> on</em> <code>s</code>.</p>
2
+
3
+
<p>A <strong>shift</strong> on <code>s</code> consists of moving the leftmost character of <code>s</code> to the rightmost position.</p>
4
+
5
+
<ul>
6
+
<li>For example, if <code>s = "abcde"</code>, then it will be <code>"bcdea"</code> after one shift.</li>
7
+
</ul>
8
+
9
+
<p> </p>
10
+
<p><strongclass="example">Example 1:</strong></p>
11
+
<pre><strong>Input:</strong> s = "abcde", goal = "cdeab"
0 commit comments