Company: Agoda
Difficulty: medium
2. Missing Words Given two strings, one is a subsequence if all of the elements of the first string occur in the same order within the second string. They do not have to be contiguous in the second string, but order must be maintained. For example, given the string 'I like cheese', the words ('I', 'cheese') are one possible subsequence of that string. Words are space delimited. Given two strings, s and t , where t is a subsequence of s , report the words of s missing in t (case sensitive), in the order they are missing. Function Description Complete the function missingWords in the editor below. missingWords has the following parameter(s): string s : a sentence of space-separated words string t : a sentence of space-separated words Returns: string[] : an array of strings that contains all words in s that are missing from t , in the order they occur within s Constraints Strings s and t consist of English alphabetic letters (i.e., a-z and A-Z, dash '-', and spaces only) All words are del