Easy · Math

Is palindromic number

Given an integer n, return true if its decimal digits read the same forwards and backwards (for example 121 or 1221), and false otherwise; negative numbers are never palindromes.

Examples

Example 1

n = 121

Output: true

Example 2

n = 1234

Output: false

Rebuild it in the studio

Open every published interview problem, solution, scene, and memory room free, with no account.

More Math problems