Imagine a world inside mirror, where everything becomes reverse. Left hand becomes right hand, right…
Click here to read the complete problem statement.
If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.
ok if i reverse it and compare there is an invalid case like
10000000000 1 they are equal ,but it will show 10000000000<1
so we have to do extra work to handle these tai zeroes!
In the sample test case it is given that 423 = 423;
but reversed 423 is 324 which is less than 423 (in our world)
I couldnt figure out what the problem is , please help me with this.
Actually strrev(str) is a C function defined in the header file string.h in C. You cannot include this in a C++ program. Yes, there are alternatives to this in C++, its called reverse which is defined under the header file algorithm(#include)