Palindromic Number

L3 Easy Two Pointers
Concept
A number is a palindrome if it reads the same forwards and backwards. Digits of a negative number can never form a palindrome because of the leading minus sign.
Given an integer x, return true if it reads the same forwards and backwards (ignoring the sign), otherwise false.
Examples
▸ x = 121
→ true
▸ x = -121
→ false
▸ x = 10
→ false
Progressive Hints
Hint 1 · Nudge
The sign isn't part of the reading, so compare digit by digit from both ends.
Hint 2 · Plan
Convert x into a list of its decimal digits. Then compare the first and last digits, moving inward. If any pair differs, return false.
Hint 3 · Approach
digits = decimal digits of x. left = 0, right = last index. While left < right: if digits[left] != digits[right] return false; move left right and right left. Return true.
Output
// Run your code to see the output here.