---
title: "Discussion on \"Maths: Reverse a number\" | Hashnode"
description: "Discussion on \"Maths: Reverse a number\". Reverse a number\nGiven 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 [-2<sup>31</sup>, 2<sup>31</sup> - 1], then return 0.\nclass Solution {\n    public int r..."
url: "https://hashnode.com/posts/maths-reverse-a-number/65226a3e612fa633be649758"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Maths: Reverse a number](https://ctangent.hashnode.dev/maths-reverse-a-number?utm_source=hashnode&utm_medium=feed)

Reverse a number 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 \[-2<sup>31</sup>, 2<sup>31</sup> - 1\], then return 0. class Solution { public int r...

Oct 8, 2023 · 1 min read · ctangent.hashnode.dev  
Read the article

-   [#maths](https://hashnode.com/tag/maths)
-   [#problem-solving](https://hashnode.com/tag/problem-solving)
-   [#long](https://hashnode.com/tag/long)

## Written by

[Ctangent](https://hashnode.com/@ctangent)

@ctangent

  
[View profile](https://hashnode.com/@ctangent)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
