Skip to content

Commit 83995a0

Browse files
committed
Create README - LeetHub
1 parent cff763d commit 83995a0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Diff for: 0796-rotate-string/README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<h2><a href="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>&nbsp;</p>
10+
<p><strong class="example">Example 1:</strong></p>
11+
<pre><strong>Input:</strong> s = "abcde", goal = "cdeab"
12+
<strong>Output:</strong> true
13+
</pre><p><strong class="example">Example 2:</strong></p>
14+
<pre><strong>Input:</strong> s = "abcde", goal = "abced"
15+
<strong>Output:</strong> false
16+
</pre>
17+
<p>&nbsp;</p>
18+
<p><strong>Constraints:</strong></p>
19+
20+
<ul>
21+
<li><code>1 &lt;= s.length, goal.length &lt;= 100</code></li>
22+
<li><code>s</code> and <code>goal</code> consist of lowercase English letters.</li>
23+
</ul>
24+
</div>

0 commit comments

Comments
 (0)