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.
If you're wondering why your test case doesn't work, it's because the test cases are wrong, not your solution.
They expect you to use a trie but this is not in the instructions, yet the order in which the first bad string appears depends entirely on your solution. The deteciton of any bad string should have been sufficient to solve this problem.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
No Prefix Set
You are viewing a single comment's thread. Return to all comments →
If you're wondering why your test case doesn't work, it's because the test cases are wrong, not your solution.
They expect you to use a trie but this is not in the instructions, yet the order in which the first bad string appears depends entirely on your solution. The deteciton of any bad string should have been sufficient to solve this problem.