You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can further challenge yourself by working on time and space complexities for each prefix tree method. You would be expected to do this in interviews, and it would be good practice :)
Your complete and size tests are failing. Are you checking for duplicate insert when updating your size property? For your complete function, make sure you are finding all words in your tree that complete the given prefix.
Your contains method is failing tests. This method should only be returning true for words that are in the tree and terminal.
Your strings method is failing tests. For test_strings, try adding print(tree_strings, input_strings) and see what is being added to both. It might give you some direction for debugging.
The text was updated successfully, but these errors were encountered:
Great job on completing the prefix tree!
The text was updated successfully, but these errors were encountered: