Top "Binary-search-tree" questions

A binary search tree is a data structure which consists of a root node with left and right child nodes.

Finding height in Binary Search Tree

I was wondering if anybody could help me rework this method to find the height of a binary search tree. …

algorithm recursion binary-search-tree
Difference between binary tree and binary search tree

Can anyone please explain the difference between binary tree and binary search tree with an example?

data-structures tree binary-tree binary-search-tree
Heap vs Binary Search Tree (BST)

What is the difference between a heap and BST? When to use a heap and when to use a BST? …

algorithm binary-tree heap binary-search-tree
How to implement a binary search tree in Python?

This is what I've got so far but it is not working: class Node: rChild,lChild,data = None,None,None …

python oop class data-structures binary-search-tree
Why is std::map implemented as a red-black tree?

Why is std::map implemented as a red-black tree? There are several balanced binary search trees (BSTs) out there. What …

c++ dictionary data-structures stl binary-search-tree
Advantages of Binary Search Trees over Hash Tables

What are the advantages of binary search trees over hash tables? Hash tables can look up any element in Theta(1) …

data-structures hashtable binary-search-tree
How do you validate a binary search tree?

I read on here of an exercise in interviews known as validating a binary search tree. How exactly does this …

algorithm data-structures binary-search-tree
Pre-order to post-order traversal

If the pre-order traversal of a binary search tree is 6, 2, 1, 4, 3, 7, 10, 9, 11, how to get the post-order traversal?

algorithm data-structures tree-traversal binary-search-tree
PHP daylight saving time detection

I need to send an email to users based wherever in the world at 9:00 am local time. The server is …

php dst gmt binary-search-tree
How to calculate the depth of a binary search tree

I would like to calculate the summation of the depths of each node of a Binary Search Tree. The individual …

java recursion binary-search-tree