Remove One Letter
Given two strings s0
and s1
, return whether you can obtain s1
by removing 1 letter from s0
.
Constraints
0 ≤ n ≤ 200,000
wheren
is the length ofs0
0 ≤ m ≤ 200,000
wherem
is the length of `s1
https://binarysearch.com/problems/Remove-One-Letter
Examples
Example 1
Input
- s0 =
hello
- s1 =
hello
Output
- answer =
False
Example 2
Input
- s0 =
hello
- s1 =
helo
Output
- answer =
True
Leave a comment