Compiler/test case is wierd


#1

I used the same code which was giving compile errors here in leetcode and the solution was accepted there.
Not really sure of the issue, but I spend more than 45 mins on it.