1 2 3 4 5 ··· 10 下一页
2021年12月11日
摘要: 题目 给定二叉树,求最短路径包含的节点个数 https://leetcode.com/problems/minimum-depth-of-binary-tree/ Given a binary tree, find its minimum depth. The minimum depth is th 阅读全文
posted @ 2021-12-11 02:48 alau 阅读(33) 评论(0) 推荐(0) 编辑
2021年12月10日
摘要: substring(a)从a开始 substring(a,b) [a,b] s=123456789 s.substring(3):456789 s.substring(0,3):1234 阅读全文
posted @ 2021-12-10 00:38 alau 阅读(53) 评论(0) 推荐(0) 编辑
2021年12月5日
摘要: 题目 https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/ Given an integer array nums where the elements are sorted in ascending or 阅读全文
posted @ 2021-12-05 07:48 alau 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 题目 给定括号对数n,生成所有可能的标准括号结果* *指不能)( https://leetcode.com/problems/generate-parentheses/ Given n pairs of parentheses, write a function to generate all co 阅读全文
posted @ 2021-12-05 06:47 alau 阅读(29) 评论(0) 推荐(0) 编辑
2021年12月4日
摘要: 题目 https://leetcode.com/problems/maximum-depth-of-n-ary-tree/ N叉树的最大深度 Given a n-ary tree, find its maximum depth. The maximum depth is the number of 阅读全文
posted @ 2021-12-04 18:35 alau 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 题目 BST二叉搜索树中插入元素 二叉搜索树:左边<root<右边 https://leetcode.com/problems/insert-into-a-binary-search-tree/ You are given the root node of a binary search tree 阅读全文
posted @ 2021-12-04 08:10 alau 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 题目 给定二叉树和两个点,求两点的LCA最近公共祖先 Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of L 阅读全文
posted @ 2021-12-04 02:54 alau 阅读(44) 评论(0) 推荐(0) 编辑
2021年12月3日
摘要: 题目 https://leetcode.com/problems/validate-binary-search-tree 判断所给二叉树是否是二叉搜索树 二叉搜索树:其值left<root<right *[2,2,2]这种相等的情况也不是搜索树 Given the root of a binary 阅读全文
posted @ 2021-12-03 23:41 alau 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 题目 求二叉树的深度,即根节点出发的最长路径上点的个数,即最长路径+1(本身这个点 https://leetcode.com/problems/maximum-depth-of-binary-tree/ Given the root of a binary tree, return its maxi 阅读全文
posted @ 2021-12-03 17:51 alau 阅读(22) 评论(0) 推荐(0) 编辑
2021年11月30日
摘要: 题目 n个城市,想求从src到dist的最廉价机票 有中转站数K的限制,即如果k=5,中转10次机票1000,中转5次机票2000,最后返回2000 There are n cities connected by some number of flights. You are given an ar 阅读全文
posted @ 2021-11-30 07:23 alau 阅读(42) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 10 下一页