Back to course home
0% completed
Vote For New Content
Test Cases Aren't Broad Enough
Mike
Feb 27, 2024
The description & test cases create a little ambiguity where it would seem the use of a trie is overkill. For example, this code passes all test cases:
public int minExtraChar(String str, String[] dictionary) { int count = 0; for (String word : dictionary) { count += word.length(); } return str.length() - count; }
2
0
Comments
Comments
Shubham Voraa year ago
Thanks for the suggestion! It is fixed now.