摘要: 题目链接 https://leetcode.com/problems/average of levels in binary tree/description/ 题目描述 Given a non empty binary tree, return the average value of the n 阅读全文
posted @ 2018-09-06 10:00 DCREN 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://leetcode.com/problems/trim a binary search tree/description/ 题目描述 Given a binary search tree and the lowest and highest boundaries as L a 阅读全文
posted @ 2018-09-06 09:15 DCREN 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://leetcode.com/problems/find bottom left tree value/description/ 题目描述 Given a binary tree, find the leftmost value in the last row of the t 阅读全文
posted @ 2018-09-05 14:14 DCREN 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://leetcode.com/problems/most frequent subtree sum/description/ 题目描述 Given the root of a tree, you are asked to find the most frequent subtr 阅读全文
posted @ 2018-09-05 13:50 DCREN 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://leetcode.com/problems/n ary tree preorder traversal/description/ 题目描述 Given an n ary tree, return the preorder traversal of its nodes' va 阅读全文
posted @ 2018-09-05 13:21 DCREN 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://leetcode.com/problems/kth smallest element in a bst/description/ 题目描述 Given a binary search tree, write a function kthSmallest to find th 阅读全文
posted @ 2018-08-28 12:50 DCREN 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://leetcode.com/problems/convert sorted array to binary search tree/description/ 题目描述 Given an array where elements are sorted in ascending 阅读全文
posted @ 2018-08-28 12:23 DCREN 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://leetcode.com/problems/n ary tree postorder traversal/description/ 题目描述 Given an n ary tree, return the postorder traversal of its nodes' 阅读全文
posted @ 2018-08-28 12:08 DCREN 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://leetcode cn.com/problems/maximum depth of n ary tree/description/ 题目描述 给定一个N叉树,找到其最大深度。 最大深度是指从根节点到最远叶子节点的最长路径上的节点总数。 说明: 1. 树的深度不会超过 100 阅读全文
posted @ 2018-08-27 14:54 DCREN 阅读(458) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://leetcode cn.com/problems/binary tree postorder traversal/description/ 题目描述 给定一个二叉树,返回它的 后序 遍历。 示例: 进阶: 递归算法很简单,你可以通过迭代算法完成吗? 题解 后序遍历,使用一个 阅读全文
posted @ 2018-08-27 14:28 DCREN 阅读(295) 评论(0) 推荐(0) 编辑