Dead simple one hour of work. Using map based algorithm gives us the same O(kN), where k is a maximum number of compound words like in case of trie based approach. Map approach was selected in order not repeat trie one :)
Dead simple one hour of work. Using map based algorithm gives us the same O(kN), where k is a maximum number of compound words like in case of trie based approach. Map approach was selected in order not repeat trie one :)

vsukhin/quiz