You are viewing a single comment's thread. Return to all comments →
Yep, I have seen this issue also. When I copied the code locally in a new project and I also copied one of the test cases, the lines containing the array contained empty spaces at the end. So I have erased those lines at the end and it worked fine. But with a "buggy" input from hacker rank, there is no other option but to trim the input :-).
At least we figured it out :-).