摘要: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
posted @ 2020-05-30 23:20 苗妙苗 阅读(138) 评论(0) 推荐(0)
摘要: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. N 阅读全文
posted @ 2020-05-30 10:38 苗妙苗 阅读(117) 评论(0) 推荐(0)
摘要: 还是一样的,在中序中找出那个众数存一下次数 主函数看谁的value最大 可以用map,是哦! https://leetcode.com/problems/find-mode-in-binary-search-tree/discuss/98103/Java-AC-Solution 阅读全文
posted @ 2020-05-30 09:31 苗妙苗 阅读(123) 评论(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 lef 阅读全文
posted @ 2020-05-30 08:42 苗妙苗 阅读(181) 评论(0) 推荐(0)