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.

Difference between a LinkedList and a Binary Search Tree

What are the main differences between a Linked List and a BinarySearchTree? Is BST just a way of maintaining a …

data-structures linked-list language-agnostic binary-search-tree
Finding if a Binary Tree is a Binary Search Tree

Today I had an interview where I was asked to write a program which takes a Binary Tree and returns …

algorithm binary-tree binary-search-tree
Implementing an iterator over a binary search tree

I've been coding up a bunch of different binary search tree implementations recently (AVL, splay, treap) and am curious if …

algorithm iterator binary-search-tree
Binary Tree Insert Algorithm

I recently finished implementing a Binary search tree for a project I was working on. It went well and I …

c++ tree insert binary-tree binary-search-tree
Why lookup in a Binary Search Tree is O(log(n))?

I can see how, when looking up a value in a BST we leave half the tree everytime we compare …

data-structures time-complexity big-o binary-search-tree
Finding the minimum and maximum height in a AVL tree, given a number of nodes?

Is there a formula to calculate what the maximum and minimum height for an AVL tree, given a certain number …

data-structures binary-search-tree avl-tree
In Order Successor in Binary Search Tree

Given a node in a BST, how does one find the next higher key?

algorithm data-structures tree binary-search-tree
Rebalancing an arbitrary BST?

Reference: I was asked this question @MS SDE interview, 3rd round. And it's not a homework problem. I also gave …

algorithm data-structures binary-search-tree
Difference between the time complexity required to build Binary search tree and AVL tree?

While I was learning Binary search tree(Balanced and unbalanced), I come up with questions which I need to resolve: …

algorithm data-structures binary-search-tree time-complexity avl-tree
How to Serialize Binary Tree

I went to an interview today where I was asked to serialize a binary tree. I implemented an array-based approach …

serialization tree binary-tree flatten binary-search-tree