摘要:
Given a binary search tree and a node in it, find the in-order successor of that node in the BST. Note: If the given node has no in-order successor in 阅读全文
posted @ 2017-03-24 11:35
CodesKiller
阅读(169)
评论(0)
推荐(0)
摘要:
Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, ex 阅读全文
posted @ 2017-03-24 08:39
CodesKiller
阅读(166)
评论(0)
推荐(0)
摘要:
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 @ 2017-03-24 07:13
CodesKiller
阅读(130)
评论(0)
推荐(0)
摘要:
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 @ 2017-03-24 02:57
CodesKiller
阅读(204)
评论(0)
推荐(0)
摘要:
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's 阅读全文
posted @ 2017-03-24 01:44
CodesKiller
阅读(134)
评论(0)
推荐(0)
摘要:
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n 阅读全文
posted @ 2017-03-24 01:10
CodesKiller
阅读(196)
评论(0)
推荐(0)
浙公网安备 33010602011771号