摘要:
[抄题]: Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Given a non-empty binary searc 阅读全文
posted @ 2018-03-17 22:45
苗妙苗
阅读(496)
评论(0)
推荐(0)
摘要:
[抄题]: Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum of all lef 阅读全文
posted @ 2018-03-17 21:49
苗妙苗
阅读(164)
评论(0)
推荐(0)
摘要:
[抄题]: Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of 阅读全文
posted @ 2018-03-17 19:45
苗妙苗
阅读(374)
评论(1)
推荐(0)
摘要:
[抄题]: Find the sum of all left leaves in a given binary tree. Example: [暴力解法]: 时间分析: 空间分析: [奇葩输出条件]: [奇葩corner case]: [思维问题]: root.left root.right只是递归 阅读全文
posted @ 2018-03-17 15:11
苗妙苗
阅读(124)
评论(0)
推荐(0)
摘要:
[抄题]: Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: [暴力解法]: 时间分析: 空间分析: [奇葩输出 阅读全文
posted @ 2018-03-17 10:03
苗妙苗
阅读(235)
评论(0)
推荐(0)

浙公网安备 33010602011771号