Don't waste time on this..it has ambiguous test cases


#1

Below is my code and it is not correct for integer overflows…
But still they have accepted the solution.
Code:

int atoi(string A)

{

int x{0};

stringstream s(A);

s>>x;

return x;

}