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.

Given a BST and its root, print all sequences of nodes which give rise to the same bst

Given a BST, find all sequences of nodes starting from root that will essentially give the same binary search tree. …

permutation binary-search-tree sequences
In Big-O notation for tree structures: Why do some sources refer to O(logN) and some to O(h)?

In researching complexity for any algorithm that traverses a binary search tree, I see two different ways to express the …

algorithm data-structures tree big-o binary-search-tree
Handling duplicates keys within an AVL tree

I want to make my avl-tree support duplicate keys but there is a problem with the default behavior of the …

binary-tree binary-search-tree avl-tree reference-counting
Deletion in AVL Tree

As you know how avl should be balanced after deletion of a node, I'll get to point. For starting, Im …

c++ data-structures binary-search-tree avl-tree
To find largest element smaller than K in a BST

Given a binary search tree and an integer K, i would like to find the largest element less than K. …

c++ c binary-search-tree
Why red-black tree based implementation for java TreeMap?

The third paragraph of wikipedia's article on AVL trees says: "Because AVL trees are more rigidly balanced, they are faster …

java algorithm binary-search-tree avl-tree red-black-tree
Remove the minimum value in a binary search tree

I understand the algorithms but I am not sure how to put it into actual codes. Please help! And also …

java binary-search-tree remove-method
Find number of permutations of a given sequence of integers which yield the same binary search tree

Given an array of integers arr = [5, 6, 1]. When we construct a BST with this input in the same order, we will …

algorithm binary-search-tree
Is it always possible to turn one BST into another using tree rotations?

Given a set of values, it's possible for there to be many different possible binary search trees that can be …

algorithm data-structures binary-search-tree tree-rotation