05 2022 档案

摘要:本体关键就是二叉树加递归 在递归中用int数组保存需要的内容 //二叉树加递归 注意int[]返回值很关键 public class L333 { private int ans; public int largestBSTSubtree(TreeNode root) { isBST(root); 阅读全文
posted @ 2022-05-09 10:01 fao99 阅读(78) 评论(0) 推荐(0) 编辑
摘要:动态规划 public int minCost(int[][] costs) { int[][] dp=new int[costs.length][3]; dp[0][0]=costs[0][0]; dp[0][1]=costs[0][1]; dp[0][2]=costs[0][2]; for(in 阅读全文
posted @ 2022-05-05 10:27 fao99 阅读(42) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示