Skip to content

Practice A Number After a Double Reversal

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Easy#2119
LeetCode Problem

A Number After a Double Reversal

Problem Statement

Reversing an integer means to reverse all its digits. Given an integer num, reverse num to get reversed1, then reverse reversed1 to get reversed2. Return true if reversed2 equals num. Otherwise return false.

Source: A Number After a Double Reversal on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
num = 526
Output
true

# Example 2

Input
num = 1800
Output
false

# Example 3

Input
num = 0
Output
true

Constraints

0 <= num <= 10^6

Related LeetCode Problems

Practice more problems similar to A Number After a Double Reversal.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.