Skewed Binary Trees
This lesson is an introduction to another type of binary tree called “skewed binary tree.” You will look at some of its properties and types.
We'll cover the following
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
The right-skewed binary trees have all right child nodes.
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.