Skip to content

Commit e2753c8

Browse files
committed
Create README - LeetHub
1 parent e609cc1 commit e2753c8

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

0009-palindrome-number/README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<h2><a href="https://leetcode.com/problems/palindrome-number">9. Palindrome Number</a></h2><h3>Easy</h3><hr><p>Given an integer <code>x</code>, return <code>true</code><em> if </em><code>x</code><em> is a </em><span data-keyword="palindrome-integer"><em><strong>palindrome</strong></em></span><em>, and </em><code>false</code><em> otherwise</em>.</p>
2+
3+
<p>&nbsp;</p>
4+
<p><strong class="example">Example 1:</strong></p>
5+
6+
<pre>
7+
<strong>Input:</strong> x = 121
8+
<strong>Output:</strong> true
9+
<strong>Explanation:</strong> 121 reads as 121 from left to right and from right to left.
10+
</pre>
11+
12+
<p><strong class="example">Example 2:</strong></p>
13+
14+
<pre>
15+
<strong>Input:</strong> x = -121
16+
<strong>Output:</strong> false
17+
<strong>Explanation:</strong> From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome.
18+
</pre>
19+
20+
<p><strong class="example">Example 3:</strong></p>
21+
22+
<pre>
23+
<strong>Input:</strong> x = 10
24+
<strong>Output:</strong> false
25+
<strong>Explanation:</strong> Reads 01 from right to left. Therefore it is not a palindrome.
26+
</pre>
27+
28+
<p>&nbsp;</p>
29+
<p><strong>Constraints:</strong></p>
30+
31+
<ul>
32+
<li><code>-2<sup>31</sup>&nbsp;&lt;= x &lt;= 2<sup>31</sup>&nbsp;- 1</code></li>
33+
</ul>
34+
35+
<p>&nbsp;</p>
36+
<strong>Follow up:</strong> Could you solve it without converting the integer to a string?

0 commit comments

Comments
 (0)