Stream Of Characters
Implement the StreamChecker class as follows: 1. StreamChecker(words): Constructor, init the data structure with the given words. 2. query(letter): returns true if and only if for some k >= 1, the last k characters queried (in order from oldest to newest, including this letter just queried) spell one of the words in the given list.
1. Words will only consist of lowercase English letters. 2. Queries will only consist of lowercase English letters
Input is managed for you
Output is managed for you
3 cd f kl 12 a b c d e f g h i j k l
false false false true false true false false false false false true