Reverse Integer at Bloomberg

Medium31.5% acceptance

This problem has 75.0% frequency at Bloomberg.

Problem Description

Given a signed 32-bit integer `x`, return `x` _with its digits reversed_. If reversing `x` causes the value to go outside the signed 32-bit integer range `[-231, 231 - 1]`, then return `0`. **Assume the environment does not allow you to store 64-bit integers (signed or unsigned).**

Read full problem and hints

Topics

Also asked at 25 companies


More Bloomberg Questions

View all Bloomberg questions