-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trie problems #117
Trie problems #117
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ashokdey Test cases where all-words-in-trie
and total-words-in-trie
failed:
- In all-words-in-trie`
- words = ['bed', 'ball', 'ball'];
- output: 2
- expected output: 3
total-words-in-trie
- words = ['bed', 'ball', 'ball']
- output : ['bed', 'ball']
- expected output : ['bed', 'ball', 'ball']
Do Tries store the same word twice? The path is same hence I don't see a chance it will store the same word more than once. |
@ashokdey Suppose I inserted 'ball' 2 times in trie. Path will be same . |
Thanks, done! 💯 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 What's inside?
This PR contains a few problems involving Trie DataStructure.