Skip to content

Commit 4a4d8ef

Browse files
committed
Create README - LeetHub
1 parent 54872ee commit 4a4d8ef

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

permutation-in-string/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<h2>567. Permutation in String</h2><h3>Medium</h3><hr><div><p>Given two strings <b>s1</b> and <b>s2</b>, write a function to return true if <b>s2</b> contains the permutation of <b>s1</b>. In other words, one of the first string's permutations is the <b>substring</b> of the second string.</p>
2+
3+
<p>&nbsp;</p>
4+
5+
<p><b>Example 1:</b></p>
6+
7+
<pre><b>Input: </b>s1 = "ab" s2 = "eidbaooo"
8+
<b>Output: </b>True
9+
<b>Explanation:</b> s2 contains one permutation of s1 ("ba").
10+
</pre>
11+
12+
<p><b>Example 2:</b></p>
13+
14+
<pre><b>Input:</b>s1= "ab" s2 = "eidboaoo"
15+
<b>Output:</b> False
16+
</pre>
17+
18+
<p>&nbsp;</p>
19+
<p><strong>Constraints:</strong></p>
20+
21+
<ul>
22+
<li>The input strings only contain lower case letters.</li>
23+
<li>The length of both given strings is in range [1, 10,000].</li>
24+
</ul>
25+
</div>

0 commit comments

Comments
 (0)