摘要:
https://leetcode.cn/problems/integer-break/ dp,思路较为巧妙,需要考虑一个数至少能拆成两份这个点,且需要考虑到拆的这个数的值域是多少(1,i-1),来划分子集且选择拆一次还是拆多次 class Solution { public: int integer 阅读全文
摘要:
https://leetcode.cn/problems/binary-tree-cameras/description/ 结合二叉树的贪心题,思路较难想出 /** * Definition for a binary tree node. * public class TreeNode { * in 阅读全文
摘要:
https://leetcode.cn/problems/monotone-increasing-digits/description/ class Solution { public int monotoneIncreasingDigits(int n) { // 返回单调递增的最大数字 // 思 阅读全文
摘要:
https://leetcode.cn/problems/non-overlapping-intervals/description/ 贪心:思路是更新重叠的区间 class Solution { public int eraseOverlapIntervals(int[][] intervals) 阅读全文