摘要: day32 打卡122.买卖股票的最佳时机II 55. 跳跃游戏 45.跳跃游戏II 122.买卖股票的最佳时机II 122题目链接 class Solution { public int maxProfit(int[] prices) { int result = 0 ; for (int i = 阅读全文
posted @ 2023-04-01 10:24 zzzzzzsl 阅读(23) 评论(0) 推荐(0)
摘要: day31 打卡455.分发饼干 376. 摆动序列 53. 最大子数组和 455.分发饼干 455题目链接 class Solution { public int findContentChildren(int[] g, int[] s) { int count = 0; Arrays.sort( 阅读全文
posted @ 2023-03-31 11:58 zzzzzzsl 阅读(27) 评论(0) 推荐(0)
摘要: day30 打卡332. 重新安排行程 51. N 皇后 37. 解数独 332. 重新安排行程 332题目链接 去b站搜了视频讲解在写的。视频地址 class Solution { List<String> result = new ArrayList<>(); public List<Strin 阅读全文
posted @ 2023-03-30 16:40 zzzzzzsl 阅读(45) 评论(0) 推荐(0)
摘要: day29 打卡491.递增子序列 46.全排列 47.全排列 II 491.递增子序列 491题目链接 class Solution { List<List<Integer>> result = new ArrayList<>(); LinkedList<Integer> path = new L 阅读全文
posted @ 2023-03-30 09:43 zzzzzzsl 阅读(19) 评论(0) 推荐(0)
摘要: day28 打卡93.复原IP地址 78.子集 90.子集II 93.复原IP地址 93题目链接 class Solution { List<String> result = new ArrayList<>(); public List<String> restoreIpAddresses(Stri 阅读全文
posted @ 2023-03-28 09:28 zzzzzzsl 阅读(23) 评论(0) 推荐(0)
摘要: day27 打卡39. 组合总和 40.组合总和II 131.分割回文串 39. 组合总和 39题目链接 class Solution { List<List<Integer>> result = new ArrayList<>(); LinkedList<Integer> path = new L 阅读全文
posted @ 2023-03-27 22:35 zzzzzzsl 阅读(19) 评论(0) 推荐(0)
摘要: day25 打卡216.组合总和III 17.电话号码的字母组合 216.组合总和III 216题目链接 class Solution { List<List<Integer>> result = new ArrayList<>(); LinkedList<Integer> path = new L 阅读全文
posted @ 2023-03-25 12:03 zzzzzzsl 阅读(21) 评论(0) 推荐(0)
摘要: day24 打卡第77题. 组合 第77题. 组合 77题目链接 class Solution { List<List<Integer>> result = new ArrayList<>(); List<Integer> path = new LinkedList<>(); public List 阅读全文
posted @ 2023-03-24 13:12 zzzzzzsl 阅读(13) 评论(0) 推荐(0)
摘要: day23 打卡669. 修剪二叉搜索树 108.将有序数组转换为二叉搜索树 538.把二叉搜索树转换为累加树 669. 修剪二叉搜索树 669题目链接 1.迭代法 class Solution { public TreeNode trimBST(TreeNode root, int low, in 阅读全文
posted @ 2023-03-23 19:38 zzzzzzsl 阅读(18) 评论(0) 推荐(0)
摘要: day22 打卡235. 二叉搜索树的最近公共祖先 701.二叉搜索树中的插入操作 450.删除二叉搜索树中的节点 235. 二叉搜索树的最近公共祖先 235题目链接 1.递归法。利用二叉搜素树中间节点肯定大于左子树,小于右子树的特征。 class Solution { public TreeNod 阅读全文
posted @ 2023-03-22 15:49 zzzzzzsl 阅读(25) 评论(0) 推荐(0)