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.

Real world examples of tree structures

I'm looking for some examples of tree structures that are used in commercial/free software projects, modern or old. I …

tree binary-tree binary-search-tree
Proof that the height of a balanced binary-search tree is log(n)

The binary-search algorithm takes log(n) time, because of the fact that the height of the tree (with n nodes) …

performance tree binary-search-tree
Printing to a file in C

How do I print to an empty .txt file I already have created? I already print the results to the …

c text-files output binary-search-tree
Iterate through binary search tree to find all leaves

I am pretty new to trees, and I am trying to create kind of a "leaf iterator". I'm thinking it …

java algorithm iterator nodes binary-search-tree
How to find the closest element to a given key value in a binary search tree?

Given a bst with integer values as keys how do I find the closest node to that key in a …

algorithm data-structures binary-search-tree
Inserting an element in Binary Tree

Tried exploring a lot over the net, but could get any help, Everywhere its like adding a node to the …

c tree binary-tree binary-search-tree
Java : How do I implement a generic Binary Search Tree?

Until now, I have been writing a Node class as class Node { private value; private Node left; private Node right; …

java binary-search-tree
Binary search tree over AVL tree

As far as I know the time complexity between AVL trees and Binary Search Trees are the same in average …

performance data-structures tree binary-search-tree avl-tree
Difference between AVL trees and splay trees

I am studying about various trees, and came across AVL trees and splay trees. I want to know What is …

algorithm data-structures binary-search-tree avl-tree splay-tree
How to merge two BST's efficiently?

How to merge two binary search trees maintaining the property of BST? If we decide to take each element from …

c++ algorithm data-structures merge binary-search-tree