Algorithm · Google · Medium
Problem: Jammed Keyboard Dictionary Match You receive a collection of words, dictionary, along with a typed string named jammed_string. Suppose the keyboard may hold a key down while a dictionary word is being entered: No letters from the word disappear. Letter ordering remains unchanged. Characters other than those in the word cannot be introduced. Each original character is allowed to appear as one or more adjacent copies in the resulting text. In other words, a character…