Easy
Is Subsequence
Easy
245 submissions
10 coins
+50 XP
String
Two Pointers
Problem Description
Return `true` if `s` can be obtained by deleting zero or more characters from `t` without changing the order of the remaining characters, otherwise return `false`.
**Example 1:**
```
Input: s = "abc", t = "ahbgdc"
Output: true
```
**Example 2:**
```
Input: s = "axc", t = "ahbgdc"
Output: false
```
**Example 3:**
```
Input: s = "", t = "abc"
Output: true
```
Constraints
- `0 <= s.length <= 100`
- `0 <= t.length <= 10^4`
- Lowercase English letters only.
Need help?
Connect with expert programmers for real-time collaborative coding, video meetings, and whiteboard sessions via CodeConnect.
Video Call
Whiteboard
Live Coding
Screen Share