Leetcode - 9. Palindrome Number
此篇文章為我的解題紀錄,程式碼或許並不是很完善
Leetcode - 9. Palindrome Number
解題思路
將x
轉為字串後再跑迴圈檢查是否為回文
我滴程式碼
1 | class Solution: |
看過大神後的程式碼
將字串翻轉後再檢查兩個字串是否相等
1 | class Solution: |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment
GitalkFacebook Comments