摘要:
##491. 递增子序列 题目|文章 ####思路 这个题中不能对这个序列进行重新排序,因此需要用到set进行去重 ####实现 点击查看代码 class Solution { public: vector<vector<int>> findSubsequences(vector<int>& num 阅读全文
posted @ 2022-10-29 00:35
缩地
阅读(22)
评论(0)
推荐(0)
摘要:
##93. 复原 IP 地址 题目|文章 ####思路 1.先判断每个部分是不是符合要求 2.如果符合要求则加入path,递归下一层 3.当遍历到字符串末尾,如果有四层,则加入结果,否则直接返回。 ####实现 点击查看代码 class Solution { public: vector<strin 阅读全文
posted @ 2022-10-29 00:16
缩地
阅读(28)
评论(0)
推荐(0)
摘要:
##39. 组合总和 题目|文章 ####思路 题目的关键点在于无限制重复选取,那么可以不用去重,只要和sum == target 就可以返回。 ####实现 点击查看代码 class Solution { public: vector<vector<int>> combinationSum(vec 阅读全文
posted @ 2022-10-29 00:06
缩地
阅读(26)
评论(0)
推荐(0)

浙公网安备 33010602011771号