Leetcode刷题
Touching浪底
这个作者很懒,什么都没留下…
展开
-
Leetcode3.无重复字符的最长子串(中等)Python
【代码】Leetcode3.无重复字符的最长子串(中等)Python。原创 2022-11-09 19:14:47 · 358 阅读 · 0 评论 -
Leetcode34.在排序数组中查找元素的第一个和最后一个位置(中等)Python
【代码】Leetcode34.在排序数组中查找元素的第一个和最后一个位置。原创 2022-11-08 14:50:07 · 690 阅读 · 0 评论 -
Leetcode18.四数之和(中等)Python
【代码】Leetcode18.四数之和(中等)Python。原创 2022-11-08 14:06:21 · 270 阅读 · 0 评论 -
Leetcode15.三数之和(中等)Python
【代码】Leetcode15.三数之和(中等)Python。原创 2022-11-07 13:31:23 · 618 阅读 · 0 评论 -
Leetcode16.最接近的三数之和(中等)Python
【代码】Leetcode16.最接近的三数之和Python。原创 2022-11-07 11:33:38 · 114 阅读 · 0 评论 -
Leetcode14.最长公共前缀(简单)Python
【代码】Leetcode14.最长公共前缀(简单)Python。原创 2022-11-06 20:03:22 · 92 阅读 · 0 评论 -
Leetcode27.移除元素(简单)Python
Leetcode27.移除元素(简单)Python原创 2022-11-04 23:26:48 · 239 阅读 · 0 评论 -
Leetcode26.删除有序数组中的重复项(简单)Python
Leetcode26.删除有序数组中的重复项(简单)Python原创 2022-11-04 22:38:11 · 230 阅读 · 0 评论 -
Leetcode20.有效的括号(简单)Python
有对应关系首先考虑字典。原创 2022-11-03 23:31:18 · 61 阅读 · 0 评论 -
Leetcode9.回文数(简单)Python
【代码】Leetcode9.回文数(简单)Python。原创 2022-11-03 23:14:36 · 89 阅读 · 0 评论 -
Leetcode7.整数反转(中等)Python
【代码】Leetcode7.整数反转(简单)Python。原创 2022-11-03 23:02:08 · 666 阅读 · 0 评论 -
Leetcode13.罗马数字转整数(简单)Python
用字典,就不需要写条件判断(而且python中没有switch语句,所以也不考虑)。原创 2022-11-03 22:51:48 · 68 阅读 · 0 评论 -
Leetcode1.两数之和(简单)Python
如果是相同的数,返回下标时只会返回最前面的那一个,所以就要用temp_nums.index(),返回的时候加前面的nums.index(),因为nums.index()是从0开始的,temp_nums.index()也是从0开始的,所以要+1。原创 2022-11-03 22:30:57 · 127 阅读 · 0 评论 -
Leetcode35.搜索插入位置(简单)Python
在数组中搜索或插入位置,使用数据结构二分法。原创 2022-11-03 21:49:26 · 62 阅读 · 0 评论