Something not so nice about the test input


#1

The input “Good Words” can contain duplicates, this is not so nice especially for debugging a long input, and it doesn’t really test any “ability” of the problem solver, but adds confusions. How should I treat a duplicate word? Should I consider it has double weightage and counted it twice? Or I should simply ignore it? In the problem, it’s the latter case. However, as I said, it doesn’t test anything, the problem/solution should focus on trie implementation instead.


#2

Thank you for that hint, applying distinct on good words list finally finished the long test case quest :slight_smile:


#3

If you are using a Trie as you’re supposed to for this problem, then duplicates will not be a problem at all. I guess having duplicates shows one of the advantages of Tries.