Check if the number is negative or if it ends with 0 (but is not 0 itself); if so, return false.
Initialize a variable to store the reversed half of the number.
While the original number is greater than the reversed number:
a. Extract the last digit of the original number using the modulus operator.
b. Multiply the reversed number by 10 and add the extracted digit.
c. Divide the original number by 10.
Check if the original number is equal to the reversed number (even length palindrome) or if the original number is equal to the reversed number divided by 10 (odd length palindrome).
Return true if either condition from step 4 is met, otherwise return false.