← 返回 meta 的题目列表Check Subsequence Occurrence
类型:online_judge
Given two strings s1 and s2, write a program to determine if s1 contains all characters of s2, i.e., if s2 is a subsequence of s1. Return True or False. Test cases:
Input: s1 = "abcdefg", s2 = "ace", Output: True
Input: s1 = "abcdefg", s2 = "aec", Output: False
The length of the strings will not exceed 1000.
Example
Input
abcdefg ace