I know various ways to check if an integer is a palindrome or not by using string conversion, stack and number breaking, but here question is
“How can we check wether an integer is a palindrome or not, without using any extra space?”
I know various ways to check if an integer is a palindrome or not
Share
You can revert a number with some code like:
And now you only check if
That is all. Sorry for giving the exact solution instead of just a tip, but I don’t think I could have given any tip without the solution itself.