Problem · String
Find Words in String Not in Subsequence (MLE :)
Learn this problemProblem statement
Given two strings s and t, where t is a subsequence of s. This means that the words in t appear in s in the same order but not necessarily consecutively.
Your task is to find the words in s that are not in t, and output them in their original order.
Function
findWordsNotInSubsequence(s: String, t: String) → String[]Examples
Example 1
s = "I like cheese"t = "like"return = ["I", "cheese"]These words are in
s but not part of t.More Salesforce problems
- Minimize Total Input Cost (for LTMS)Seen Jun 2026
- Count Prime StringsONSITE INTERVIEW · Seen Jun 2026
- Final Pod Counts After LogsOA · Seen May 2026
- ATM Queue Exit OrderPHONE SCREEN · Seen May 2026
- Good Ways to Split an ArrayPHONE SCREEN · Seen May 2026
- Generate Seen Binary StringsOA · Seen May 2026
- Update Pod Counts From LogsOA · Seen May 2026
- Minimum Removals to Balance ArrayOA · Seen May 2026