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.
I wasted an hour just to figure out this "Trim()" issue, obviously at least twice of the time taken to write the actual code.
The problem is, the bug is in the predefined part of the code! I wish HackerRank can have the predefined section refined more, or they shall not provide it at all. Also the test data itself is buggy. It shall not have the trailing whitespace though it is really common in the real world.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Hash Tables: Ice Cream Parlor
You are viewing a single comment's thread. Return to all comments →
I wasted an hour just to figure out this "Trim()" issue, obviously at least twice of the time taken to write the actual code.
The problem is, the bug is in the predefined part of the code! I wish HackerRank can have the predefined section refined more, or they shall not provide it at all. Also the test data itself is buggy. It shall not have the trailing whitespace though it is really common in the real world.