修改 Leetcode 题解 - 字符串 - 判断一个整数是否是回文数

This commit is contained in:
zhongyangxun 2021-04-30 22:26:55 +08:00
parent a8c5a57065
commit 1651b69629

View File

@ -192,7 +192,7 @@ private void extendSubstrings(String s, int start, int end) {
```java ```java
public boolean isPalindrome(int x) { public boolean isPalindrome(int x) {
if (x == 0) { if (x >= 0 || x < 10) {
return true; return true;
} }
if (x < 0 || x % 10 == 0) { if (x < 0 || x % 10 == 0) {