Company: Amazon
Difficulty: easy
You are playing a word-based quest game where you have two arrays: a list of names (could be people's names, fruits, or animals) and a list of character clues . Each name in the game represents a player, and the character clues are hints that guide you toward finding which players have the required letters in their names. The objective is to determine which players (names) from the first array contain all the characters from the clues, including multiple occurrences if needed . Moreover, the players must have the characters in the order hinted by the clues — that is, reading the name from left to right you must be able to meet clue 1, then clue 2, then clue 3, and so on. (Formally: the clue string must be a subsequence of the name.) You need to return the list of valid players along with their positions (index + 1) from the names array, maintaining the same order in which they appear in the input. Input Format The first line contains an integer N , the number of names. The second