Skewed Binary Trees

In this lesson, we will discuss another type of Binary Tree called Skewed Binary Tree. We will look at some of its properties and types.

Introduction #

The binary tree in which each node has either one or no child is known as a skewed binary tree. In this type of tree, either all nodes are positioned to the left or the right. This type of Binary Tree structure should be avoided at all costs because the time complexity of most operations will be high.

There are two types of Skewed Binary Trees based on which side the tree leans towards.

  • Left-Skewed Binary Trees
  • Right-Skewed Binary Trees

Left-Skewed Binary Trees #

The left-skewed binary tree has all left child nodes.

Right-Skewed Binary Trees #

Right skewed binary trees have all right nodes.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.