If I understand the example correctly, the problem with the incorrect greedy solution is that it locks on the first prefix it finds in the dictionary and then, if the rest of the string is not a word, fails. It's wrong because maybe the greedy prefix wasn't the right way to split.