File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change 1- /* *
2- * 9. Palindrome Number
3- *
4- * Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.
5-
6- Example 1:
7-
8- Input: 121
9- Output: true
10- Example 2:
11-
12- Input: -121
13- Output: false
14- Explanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome.
15- Example 3:
16-
17- Input: 10
18- Output: false
19- Explanation: Reads 01 from right to left. Therefore it is not a palindrome.
20- Follow up:
21-
22- Coud you solve it without converting the integer to a string?
23- */
24-
251class Solution1 {
262 /* *This is a Java translation, while its Java counterpart could be accepted perfectly, this one failed due to
273 * Char 21: runtime error: signed integer overflow: 746384741 * 10 cannot be represented in type 'int' (solution.cpp)
You can’t perform that action at this time.
0 commit comments