New answers tagged tree
2
votes
Leet Code: 236. Lowest Common Ancestor of a Binary Tree
An alternative approach
If we were making repeated inquiries on the same tree, there are two problems:
It's not a balanced binary sort tree, so searching is O(n) rather than O(log n) or better.
This ...
2
votes
Binary Search Tree implementation in C++ with templates
printValues
Let's consider a function with opportunity for improvement.
...
Top 50 recent answers are included
Related Tags
tree × 889java × 275
algorithm × 213
c++ × 175
python × 157
performance × 87
c# × 72
recursion × 68
c × 54
programming-challenge × 52
binary-search × 51
python-3.x × 48
javascript × 47
beginner × 45
c++11 × 43
interview-questions × 32
haskell × 27
depth-first-search × 26
breadth-first-search × 25
object-oriented × 23
python-2.x × 21
graph × 17
search × 16
array × 15
linked-list × 14