Define binary tree and skewed binary tree with an example.
Subject Algorithm Design
NU Year Set: 1.(a) Marks: 5 Year: 2008

A tree is said to be binary tree when,

1. A binary tree has a root node. It may not have any child nodes(0 child nodes, NULL tree).

2. A root node may have one or two child nodes. Each node forms a binary tree itself.

3. The number of child nodes cannot be more than two.

4. It has a unique path from the root to every other node

Skewed Binary Tree

  • If a tree which is dominated by left child node or right child node is said to be a Skewed Binary Tree.
  • In a skewed binary tree, all nodes except one have only one child node. The remaining node has no child.
  • In a left skewed tree, most of the nodes have the left child without corresponding right child.
  • In a right skewed  tree, most of the nodes have the right child without corresponding left child.
Login to post your comment.