Check whether a given number ’n’ is a palindrome number.
Palindrome numbers are the numbers that don't change when reversed. You don’t need to print anything. Just implement the given function.
Input: 'n' = 51415 Output: true Explanation: On reversing, 51415 gives 51415.
Sample Output 1 :
Explanation Of Sample Input 1:
Sample Input 2 :
1032, on being reversed, gives 2301, which is a totally different number.
Sample Output 2 :
Explanation Of Sample Input 2:
Expected time complexity:
121, on being reversed, gives 121, which is the same.
The expected time complexity is O(log(n)).
1 <= n <= 10^9 Time Limit: 1 sec