Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A subsequence is formed by deleting some (or no) characters without changing the relative order of remaining characters.
Input: s = "abc", t = "ahbgdc"
Output: true
Topics: strings, two-pointers
Asked by: Amazon, Google, Meta, Microsoft
Time complexity: O(n). Space complexity: O(1).