DatadogSoftware Engineer · OnsiteCodemia practiceDetect subsequence in string
Given a string and a subsequence, determine if the subsequence can be found within the string in the same order, but not necessarily consecutively. Return true if the subsequence exists in the string, and false otherwise. For example, given the string "abcde" and the subsequence "ace", the output should be true.