摘要: # 利用双指针,一次遍历,求出结果class Solution: def isPalindrome(self, s: str) -> bool: # 定义变量,接收字符串的长度 length = len(s) # 长度小于等于1直接返回真 if length <= 1:return True # 定 阅读全文
posted @ 2020-07-04 21:02 月为暮 阅读(174) 评论(0) 推荐(0) 编辑