Given two strings s and t, return true if s is a subsequence of t, and false otherwise. A subsequence is what remains after deleting zero or more characters from a string without changing the order of the rest; for example "ace" is a subsequence of "abcde" but "aec" is not.
Given two strings s and t, return true if s is a subsequence of t, and false otherwise. A subsequence is what remains after deleting zero or more characters from a string without changing the order of the rest; for example "ace" is a subsequence of "abcde" but "aec" is not.
Example 1:
Input: {"s":"abc","t":"ahbgdc"}
Output: true
Constraints:
0≤s.length≤100
0≤t.length≤104
s and t consist only of lowercase English letters.
Test Cases
Input (Stdin)
Expected Output (Stdout)
Execution Result
Run code to see results.
Input
arr ={"s":"abc","t":"ahbgdc"}
i = 0 points at 'a', the first character of s still to be found in t.