Skip to content

Commit a3d46ce

Browse files
committed
Create README - LeetHub
1 parent bf47df9 commit a3d46ce

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

0392-is-subsequence/README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<h2><a href="https://leetcode.com/problems/is-subsequence/?envType=study-plan-v2&envId=top-interview-150">392. Is Subsequence</a></h2><h3>Easy</h3><hr><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>&quot;ace&quot;</code> is a subsequence of <code>&quot;<u>a</u>b<u>c</u>d<u>e</u>&quot;</code> while <code>&quot;aec&quot;</code> is not).</p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
<pre><strong>Input:</strong> s = "abc", t = "ahbgdc"
8+
<strong>Output:</strong> true
9+
</pre><p><strong class="example">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?

0 commit comments

Comments
 (0)