摘要:
344. 反转字符串 思路 左右指针。 代码 Python class Solution: def reverseString(self, s: List[str]) -> None: """ Do not return anything, modify s in-place instead. "" 阅读全文
posted @ 2026-07-26 18:10
wyzsgy
阅读(1)
评论(0)
推荐(0)
摘要:
167. 两数之和 Ⅱ 思路 只要数组有序,就应该想到双指针技巧。这道题的解法有点类似二分查找,通过调节 left 和 right 就可以调整 sum 的大小 代码 Python class Solution: def twoSum(self, numbers: List[int], target: 阅读全文
posted @ 2026-07-26 17:44
wyzsgy
阅读(2)
评论(0)
推荐(0)
浙公网安备 33010602011771号