09 2025 档案

 
python刷题记录-无重复字符的最长子串-滑动窗口/哈希-中等
摘要:3. 无重复字符的最长子串 - 力扣(LeetCode) 1 class Solution(object): 2 def lengthOfLongestSubstring(self, s): 3 """ 4 :type s: str 5 :rtype: int 6 """ 7 length = le 阅读全文
posted @ 2025-09-02 15:24 Annetree 阅读(5) 评论(0) 推荐(0)
python刷题记录-两数之和-数组/哈希-简单
摘要:1. 两数之和 - 力扣(LeetCode) 第一次提交 1 class Solution(object): 2 def twoSum(self, nums, target): 3 """ 4 :type nums: List[int] 5 :type target: int 6 :rtype: L 阅读全文
posted @ 2025-09-02 11:37 Annetree 阅读(5) 评论(0) 推荐(0)
python刷题笔记
摘要:一 python 写循环 在Python中,有多种方式可以实现循环。最常用的循环结构包括for循环和while循环。下面是一些基本的例子: 1. 使用for循环 for循环通常用于遍历一个序列(如列表、元组、字符串或范围)中的元素。 遍历列表 fruits = ['apple', 'banana', 阅读全文
posted @ 2025-09-02 11:18 Annetree 阅读(4) 评论(0) 推荐(0)