Showing posts with label iterative. Show all posts
Showing posts with label iterative. Show all posts
Tuesday, August 21, 2018
Wednesday, January 7, 2015
[LintCode]Search Range In Binary Search Tree
首先是brute-force的方法, inorder看是不是在range里,在的话就加入。时间复杂度是O(N)。显然面试官不可能希望这个方法。
Labels:
binary search,
binary tree,
iterative,
LintCode,
recursion
Location:
Irvine, CA, USA
[LintCode]Insert Node in Binary Search Tree
很简单题,每个node决定是往左还是往右还是就是这个节点。类似二分的做法。
Labels:
binary search,
binary tree,
iterative,
LintCode,
recursion
Location:
Irvine, CA, USA
Subscribe to:
Posts (Atom)