leetcode 9. Palindrome Number java

class Solution {
    public boolean isPalindrome(int x) {
        ArrayList array = new ArrayList();
        int i=0;
        if(x==0){
            return true;
        }
        if(x<0){
            return false;
        }
        while(x>0){
            array.add(x%10);
            x/=10;
        }
        for(int j=0;j

 

你可能感兴趣的:(leetcode)