![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
cici_iii
keep coding
展开
-
leetcode--数组(Easy)
2019.08.02 1.返回和为指定值的两数的索引 基本思想:哈希表 关键:把数组中的值作为key,索引作为value,在一此遍历的过程中,一边转map,一边查找符合要求的两个数 26.删除排序数组中的重复项 基本思想:双指针 关键: 2019.08.03 27.移除数组中指定元素 基本思想:双指针 35.搜索元素插入位置 基本思想:二分法 二分法模板讲解 ...原创 2019-08-03 10:10:19 · 137 阅读 · 0 评论 -
leetcode--数组(Medium1)
2019.08.05 3.无重复字符的最长字串 基本思想:双指针、哈希表原创 2019-08-06 09:02:38 · 123 阅读 · 0 评论 -
leetcode--数组(Medium2)
2019.08.09 39.组合总数 基本思想:回溯 实现: def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]: candidates.sort() n = len(candidates) res = [] ...原创 2019-08-09 10:21:33 · 108 阅读 · 0 评论 -
leetcode--动态规划(Easy)
53.最大自序和 给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。 示例: 输入: [-2,1,-3,4,-1,2,1,-5,4], 输出: 6 解释: 连续子数组 [4,-1,2,1] 的和最大,为 6 ...原创 2019-08-18 09:22:24 · 112 阅读 · 0 评论