摘要: 自己写的: class Solution: def repeatedSubstringPattern(self, s: str) -> bool: # 获取字符串的长度 n = len(s) # 初始化指针指向字符串的最后一个字符 rptr = n - 1 # 在指针到达字符串的第一个字符之前循环 阅读全文
posted @ 2024-05-08 18:07 Junior_bond 阅读(3) 评论(0) 推荐(0) 编辑