This should return [true, true, true, true, true]. I don't understand why it will be [false, false, false,true,true]
But in the example it says:
Given dictionary = [ "deer", "door", "cake", "card" ] isUnique("dear") -> false isUnique("cart") -> true isUnique("cane") -> false isUnique("make") -> true
"make" is not in the given dictionary but it returns true.
Based on the given example, I think the test case is right. But description should be more detailed. Take a look at case
isUnique("cane") -> false, it keeps same abbr with cake but the result is false. I seems that if current word has the same abbr with some word in dict, they should be same word.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.