keys (all distinct). You also get a list of words words.
A word can be typed if every one of its letters is on a working key. A key may be pressed as many times as you like.
Return how many words in words can be typed on this keyboard.keys="tea", words=["tea", "eat", "tear", "ate", "seat"] → 3
You can type "tea", "eat" and "ate". "tear" needs r and "seat" needs s, and neither key works.
keys="no", words=["no", "on", "noon", "onion"] → 3
A key can be pressed any number of times, so "noon" works. "onion" has an i, so it does not.
keys="z", words=["a", "b"] → 0
keys are distinctkeys and words[i] consist of lowercase English letterskeys="tea", words=["tea", "eat", "tear", "ate", "seat"]
3
Run checks the first 3 tests in your browser. Submit checks all 55 tests on the server, hidden ones included.