概念 类似穷举的方法,不断搜索可能解的路径,当发现不满足的条件时,就回溯返回,返回后再继续尝试别的路径。 (如下图示, 为了找到迷宫的出口,不断尝
39. Combination Sum tag. array Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target. The same repeated number may be chosen from candidates unlimited number of times. Example 1: 1 2 3 4 5 6 Input: candidates = [2,3,6,7], target = 7, A solution set is: [ [7], [2,2,3] ] So
添加侧边导航栏 修改代码高亮 添加阅读进度条 相关链接 侧边导航栏 Hugo博客侧边导航栏 代码高亮 代码高亮 添加阅读进度条 为 LeaveIt 主题添加阅读进度条
感觉博客TOC(侧边导航栏,Table of Content)还是挺有必要的,在LeaveIt主题issue有人谈到TOC,但是我实践了一遍好像不
35. Search Insert Position tags. Array 向有序列表里找到需要插入值的index,且You may assume no duplicates in the array. Example 1: 1 2 Input: [1,3,5,6], 5 Output: 2 我的Solution: 1 2 3 4 5 6 class Solution: def searchInsert(self, nums: List[int], target: