We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Data Structures
- Trie
- No Prefix Set
- Discussions
No Prefix Set
No Prefix Set
Sort by
recency
|
172 Discussions
|
Please Login in order to post a comment
Test case 1 answer is 'd' is actually correct one, because you insert 'd' after you insert 'dbajkhbhbjdh' (the previous string), and right at that time, the function should determine that the word array is a BAD SET, so it should print out BAD SET d. Below are my JS code which apply Trie structure.
Why submission TestCase 1 is print "d" ? but not "dcjaichjejgheiaie"?
"dcjaichjejgheiaie" should test before "d".
Yeah I was going to comment the same thing. d can't be a prefixed by any thing other than itself, and there is only one line with d. Looks like the same problem with other test cases.
I'm encountering the same issue yet.
Java 8 solution, passed all the tests
c++ solution
Dumb question dumb answer. Passes all tests though.