Skip to content

Commit a88db59

Browse files
committed
Create README - LeetHub
1 parent 793e2d8 commit a88db59

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

Diff for: palindrome-number/README.md

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

0 commit comments

Comments
 (0)