文章

草祭の博客

并查集

题记 今天上了数理统计和数学模型与优化,感觉终于上到了我认为的好课。第一眼看到数学模型与优化的董文永老师感觉自带气场,带着帽子上课,不过讲课还

回溯算法初探

概念 类似穷举的方法,不断搜索可能解的路径,当发现不满足的条件时,就回溯返回,返回后再继续尝试别的路径。 (如下图示, 为了找到迷宫的出口,不断尝

每日Leetcode03

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