Skip to content

Commit 758ea06

Browse files
committed
Create README - LeetHub
1 parent 8b15bd3 commit 758ea06

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

392-is-subsequence/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<h2><a href="https://leetcode.com/problems/is-subsequence/">392. Is Subsequence</a></h2><h3>Easy</h3><hr><div><p>Given two strings <code>s</code> and <code>t</code>, return <code>true</code><em> if </em><code>s</code><em> is a <strong>subsequence</strong> of </em><code>t</code><em>, or </em><code>false</code><em> otherwise</em>.</p>
2+
3+
<p>A <strong>subsequence</strong> of a string is a new string that is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (i.e., <code>"ace"</code> is a subsequence of <code>"<u>a</u>b<u>c</u>d<u>e</u>"</code> while <code>"aec"</code> is not).</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong>Example 1:</strong></p>
7+
<pre><strong>Input:</strong> s = "abc", t = "ahbgdc"
8+
<strong>Output:</strong> true
9+
</pre><p><strong>Example 2:</strong></p>
10+
<pre><strong>Input:</strong> s = "axc", t = "ahbgdc"
11+
<strong>Output:</strong> false
12+
</pre>
13+
<p>&nbsp;</p>
14+
<p><strong>Constraints:</strong></p>
15+
16+
<ul>
17+
<li><code>0 &lt;= s.length &lt;= 100</code></li>
18+
<li><code>0 &lt;= t.length &lt;= 10<sup>4</sup></code></li>
19+
<li><code>s</code> and <code>t</code> consist only of lowercase English letters.</li>
20+
</ul>
21+
22+
<p>&nbsp;</p>
23+
<strong>Follow up:</strong> Suppose there are lots of incoming <code>s</code>, say <code>s<sub>1</sub>, s<sub>2</sub>, ..., s<sub>k</sub></code> where <code>k &gt;= 10<sup>9</sup></code>, and you want to check one by one to see if <code>t</code> has its subsequence. In this scenario, how would you change your code?</div>

0 commit comments

Comments
 (0)