Skip to content

Commit 13701ec

Browse files
committed
Create README - LeetHub
1 parent d1a10e3 commit 13701ec

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

0007-reverse-integer/README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<h2><a href="https://leetcode.com/problems/reverse-integer">7. Reverse Integer</a></h2><h3>Medium</h3><hr><p>Given a signed 32-bit integer <code>x</code>, return <code>x</code><em> with its digits reversed</em>. If reversing <code>x</code> causes the value to go outside the signed 32-bit integer range <code>[-2<sup>31</sup>, 2<sup>31</sup> - 1]</code>, then return <code>0</code>.</p>
2+
3+
<p><strong>Assume the environment does not allow you to store 64-bit integers (signed or unsigned).</strong></p>
4+
5+
<p>&nbsp;</p>
6+
<p><strong class="example">Example 1:</strong></p>
7+
8+
<pre>
9+
<strong>Input:</strong> x = 123
10+
<strong>Output:</strong> 321
11+
</pre>
12+
13+
<p><strong class="example">Example 2:</strong></p>
14+
15+
<pre>
16+
<strong>Input:</strong> x = -123
17+
<strong>Output:</strong> -321
18+
</pre>
19+
20+
<p><strong class="example">Example 3:</strong></p>
21+
22+
<pre>
23+
<strong>Input:</strong> x = 120
24+
<strong>Output:</strong> 21
25+
</pre>
26+
27+
<p>&nbsp;</p>
28+
<p><strong>Constraints:</strong></p>
29+
30+
<ul>
31+
<li><code>-2<sup>31</sup> &lt;= x &lt;= 2<sup>31</sup> - 1</code></li>
32+
</ul>

0 commit comments

Comments
 (0)