摘要:
题目描述 Given a binary tree, return the bottom-up level order traversal of its nodes values. (ie, from left to right, level by level from leaf to root). 阅读全文
2021年6月14日
摘要:
题目描述 给定一个二叉树,找出其最小深度。 最小深度是从根节点到最近叶子节点的最短路径上的节点数量。 说明: 叶子节点是指没有子节点的节点。 示例: 给定二叉树 [3,9,20,null,null,15,7], 3 / 9 20 / 15 7 返回它的最小深度 2. /** * Definition 阅读全文
摘要:
题目描述 Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthe 阅读全文
摘要:
题目描述 Given a binary tree, return the zigzag level order traversal f its nodes values.(ie, from left to right, then right to left for the next level an 阅读全文
摘要:
题目描述 Given a binary tree, 返回 the level order traversal of its nodes values.(ie, from left to right,level by level). For example: Given binary tree{3,9 阅读全文
摘要:
题目描述 Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the 阅读全文
2021年6月13日
摘要:
题目描述 找出所有相加之和为 n 的 k 个数的组合。组合中只允许含有 1 - 9 的正整数,并且每种组合中不存在重复的数字。 说明: 所有数字都是正整数。解集不能包含重复的组合。 示例 1: 输入: k = 3, n = 7 输出: [[1,2,4]] 示例 2: 输入: k = 3, n = 9 阅读全文
摘要:
题目描述 Given a collection of candidate numbers ( C ) and a target number ( T ),find all unique combinations in C where the candidate numbers sums to T . 阅读全文
摘要:
题目描述 Given a set of candidate numbers ( C ) and a target number ( T ),find all unique combinations in C where the candidate numbers sums to T .The sam 阅读全文