Consider this situation:
s = "aaaaaaabbbbbb"
dict = ["aaaa","aaa","bbbb","bbb"]
According to the question, what statement should be returned?And why?
I am agree with you. However , I use the solution from @babysor (https://oj.leetcode.com/discuss/15058/ac-without-recursion-o-n-solution-really-correct) and it gets AC from OJ in above situation I mentioned.