链接:https://leetcode-cn.com/problems/insert-interval/ 代码 class Solution { public: vector<vector<int>> insert(vector<vector<int>>& a, vector<int>& b) { ...
分类:
其他好文 时间:
2020-07-07 17:43:06
阅读次数:
56
给定一个字符串 s,将 s 分割成一些子串,使每个子串都是回文串。 返回 s 所有可能的分割方案。 示例: 输入: "aab"输出:[ ["aa","b"], ["a","a","b"]] 链接:https://leetcode-cn.com/problems/palindrome-partitio ...
分类:
其他好文 时间:
2020-07-07 13:26:07
阅读次数:
67
知识点:动态规划、单调栈 LeetCode第八十五题:https://leetcode-cn.com/problems/maximal-rectangle/submissions/ 有些题目是真的难,比如这题,答案都不一定抄的明白。 语言:GoLang // 结合LeetCode 84题,逐行计算。 ...
分类:
其他好文 时间:
2020-07-07 13:03:19
阅读次数:
61
链接:https://leetcode-cn.com/problems/jump-game-ii/ 代码 class Solution { public: int jump(vector<int>& nums) { int n = nums.size(); vector<int> f(n); for ...
分类:
其他好文 时间:
2020-07-07 09:32:36
阅读次数:
49
112. 路径总和 给定一个二叉树和一个目标和,判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和。 说明: 叶子节点是指没有子节点的节点。 示例: 给定如下二叉树,以及目标和 sum = 22, 5 / \ 4 8 / / \ 11 13 4 / \ \ 7 2 1 返回 ...
分类:
编程语言 时间:
2020-07-07 09:23:38
阅读次数:
102
package LeetCode_1008 /** * 1008. Construct Binary Search Tree from Preorder Traversal * https://leetcode.com/problems/construct-binary-search-tree-fr ...
分类:
其他好文 时间:
2020-07-06 23:57:45
阅读次数:
88
链接:https://leetcode-cn.com/problems/combination-sum-ii/ 代码(dfs) class Solution { public: vector<vector<int>> ans; vector<int> path; vector<vector<int> ...
分类:
其他好文 时间:
2020-07-06 16:42:37
阅读次数:
50
链接:https://leetcode-cn.com/problems/combination-sum/ 代码(dfs) class Solution { public: vector<vector<int>> ans; vector<int> path; vector<vector<int>> c ...
分类:
其他好文 时间:
2020-07-06 16:29:07
阅读次数:
61
package LeetCode_37 /** * 37. Sudoku Solver * https://leetcode.com/problems/sudoku-solver/description/ * * http://zxi.mytechroad.com/blog/searching/le ...
分类:
其他好文 时间:
2020-07-06 14:32:37
阅读次数:
51
package LeetCode_36 /** * 36. Valid Sudoku * https://leetcode.com/problems/valid-sudoku/description/ * * Determine if a 9x9 Sudoku board is valid. Onl ...
分类:
其他好文 时间:
2020-07-06 09:18:05
阅读次数:
57