上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 56 下一页

2021年6月14日

摘要: 题目描述 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). 阅读全文
posted @ 2021-06-14 14:25 朴素贝叶斯 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给定一个二叉树,找出其最小深度。 最小深度是从根节点到最近叶子节点的最短路径上的节点数量。 说明: 叶子节点是指没有子节点的节点。 示例: 给定二叉树 [3,9,20,null,null,15,7], 3 / 9 20 / 15 7 返回它的最小深度 2. /** * Definition 阅读全文
posted @ 2021-06-14 13:06 朴素贝叶斯 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 题目描述 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 阅读全文
posted @ 2021-06-14 11:17 朴素贝叶斯 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 题目描述 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 阅读全文
posted @ 2021-06-14 10:02 朴素贝叶斯 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 题目描述 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 阅读全文
posted @ 2021-06-14 08:46 朴素贝叶斯 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 题目描述 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 阅读全文
posted @ 2021-06-14 07:08 朴素贝叶斯 阅读(17) 评论(0) 推荐(0) 编辑

2021年6月13日

摘要: 题目描述 找出所有相加之和为 n 的 k 个数的组合。组合中只允许含有 1 - 9 的正整数,并且每种组合中不存在重复的数字。 说明: 所有数字都是正整数。解集不能包含重复的组合。 示例 1: 输入: k = 3, n = 7 输出: [[1,2,4]] 示例 2: 输入: k = 3, n = 9 阅读全文
posted @ 2021-06-13 20:36 朴素贝叶斯 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 题目描述 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 . 阅读全文
posted @ 2021-06-13 19:45 朴素贝叶斯 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 题目描述 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 阅读全文
posted @ 2021-06-13 18:57 朴素贝叶斯 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给定两个整数 n 和 k,返回 1 ... n 中所有可能的 k 个数的组合。 示例: 输入: n = 4, k = 2 输出: [ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4], ] 方法1 思路 没有剪枝的暴力dfs 以1-n这n个位置的情况进行遍历 阅读全文
posted @ 2021-06-13 18:16 朴素贝叶斯 阅读(27) 评论(0) 推荐(0) 编辑
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 56 下一页

导航