leetle

Daily challenge for 2025-01-28

28. Reverse Integer

Write a function solve that reverses the digits of an integer. If the reversed integer overflows, return 0.

Example:
Input: 123
Output: 321
Assume the input is a 32-bit signed integer, so the reversed integer must be within the range [-2^31, 2^31-1].

Run this challenge interactively in Python or JavaScript when the app loads.