摘要:
https://leetcode.cn/problems/integer-break/ dp,思路较为巧妙,需要考虑一个数至少能拆成两份这个点,且需要考虑到拆的这个数的值域是多少(1,i-1),来划分子集且选择拆一次还是拆多次 class Solution { public: int integer 阅读全文
posted @ 2024-08-31 23:15
风乐
阅读(16)
评论(0)
推荐(0)
摘要:
简单dphttps://leetcode.cn/problems/unique-paths-ii/description/ 传统做法: class Solution { public: int uniquePathsWithObstacles(vector<vector<int>>& obstacl 阅读全文
posted @ 2024-08-31 22:34
风乐
阅读(14)
评论(0)
推荐(0)
摘要:
https://leetcode.cn/problems/binary-tree-cameras/description/ 结合二叉树的贪心题,思路较难想出 /** * Definition for a binary tree node. * public class TreeNode { * in 阅读全文
posted @ 2024-08-31 03:06
风乐
阅读(19)
评论(0)
推荐(0)

浙公网安备 33010602011771号