spellingbee - bradendubois/competitive-programming GitHub Wiki

Spelling Bee

ID: spellingbee

Difficulty: 1.9

CPU Time: 3 seconds

Memory: 1024 MB

Solution

If one treats each word as a set of letters, then we can check that the word's letters are a subset of the letters given. If this is true, and the length of a word is at least 4, and the first letter appears in the word, print it.