...

/

What Makes a Tree Balanced?

What Makes a Tree Balanced?

In this lesson, we are going to discuss what balanced trees are, and how to determine if a tree is balanced or not?

Introduction

A binary tree is height-balanced if, for each node in the tree, the difference between the height of the right subtree and the left subtree is at most one.

Height(LeftSubTree)Height(RightSubTree)<=1|Height(LeftSubTree) - Height(RightSubTree) |<= 1 ...