Exercises/#71 Reverse Integer
#71

Reverse Integer

MediumπŸ”’ Math & Numbers
60 XP

Problem

Given a 32-bit signed integer, reverse its digits. Return 0 if the result overflows.

Examples

Input: x=123
Output: 321

Input: x=-123
Output: -321

Input: x=120
Output: 21
mathoverflow
AI Assistantβ€” powered by AI

Unlock hints progressively β€” start gentle, go deeper only if needed.

πŸ’‘

Level 1: Gentle Nudge

A subtle direction

πŸ—ΊοΈ

Level 2: Approach

The algorithm to use

πŸ”

Level 3: Detailed

Step-by-step guidance

71 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features