2016年7月13日

Closest Binary Search Tree Value II

摘要: Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target. Note: Given target value is a floati 阅读全文

posted @ 2016-07-13 21:59 Sheryl Wang 阅读(286) 评论(0) 推荐(0) 编辑

Closest Binary Search Tree Value

摘要: Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Note: Given target value is a floati 阅读全文

posted @ 2016-07-13 21:30 Sheryl Wang 阅读(217) 评论(0) 推荐(0) 编辑

Find Leaves of Binary Tree

摘要: Given a binary tree, collect a tree's nodes as if you were doing this: Collect and remove all leaves, repeat until the tree is empty. Example:Given bi 阅读全文

posted @ 2016-07-13 21:06 Sheryl Wang 阅读(252) 评论(0) 推荐(0) 编辑

Largest BST Subtree

摘要: Given a binary tree, find the largest subtree which is a Binary Search Tree (BST), where largest means subtree with largest number of nodes in it. Not 阅读全文

posted @ 2016-07-13 10:59 Sheryl Wang 阅读(180) 评论(0) 推荐(0) 编辑

导航