9. 回文数 LeetCode

image.png
class Solution {
    func isPalindrome(_ x: Int) -> Bool {
        let str = "\(x)";
        var arr:[String] = []
        for i in str{
            arr.append(String(i))
        }
        var isTrue = true
        for i in 0..

你可能感兴趣的:(9. 回文数 LeetCode)