摘要: 541. 反转字符串 II class Solution: def reverseStr(self, s: str, k: int) -> str: p = 0 while p < len(s): q = p + k s = s[:p] + s[p:q][::-1] + s[q:] p = p + 阅读全文
posted @ 2022-05-24 20:11 YTT77 阅读(27) 评论(0) 推荐(0) 编辑