bst

Build Balanced Binary Search Tree from Array

Introduction This post describes the algorithm to build binary search tree from array of sorted elements. However, this technique can be used to build balanced binary search tree from array. A balanced binary tree is a binary tree which has minimum height. To know more about various aspects of a binary search tree, please visit my previous posts. What does balanced means? In this post as we are trying to build a BST, we will assume the input to be a sorted array. In case, we are just building a binary tree, we can take any array as an input. Let me explain the process with the help of a ...
Read More

Building Binary Search Trees – detailed discussion

Introduction This is the second article for Binary Search Trees, to read more about the previous article, please check the topic Binary Search Tree Basics – a detailed discussion. To get updates on the coming articles in the series, please use the Subscribe feature on the right panel. Purpose of article This article will resume from where we concluded in the first article, this is primarily to understand how to build a BST and understand the problems which arise after building Binary Search Trees. Then we will improve over it and find out ways to build better BSTs. Do remember there is a...
Read More