Skip to main content

Command Palette

Search for a command to run...

Reverse Integer

Published
โ€ข1 min readโ€ขView as Markdown

๐Ÿง  Problem

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).


๐Ÿท๏ธ Tags

Math


๐Ÿ“Š Difficulty

Medium

โœ… Success Rate: 26.7%
๐Ÿ“ฅ Submissions: 7,589,410
๐Ÿ“ˆ Accepted: 2,022,695


โค๏ธ Reactions

๐Ÿ‘ Likes: 6971
๐Ÿ‘Ž Dislikes: 9596


๐Ÿ’ก Hints


๐Ÿ” Similar Questions

  • String to Integer (atoi)
  • Reverse Bits
  • A Number After a Double Reversal

More from this blog

ReStart LeetCode

540 posts