Trees

IMPORTANT

Trees: Overview

This topic covers concepts, such as Binary Trees, Internal Nodes in Tree Data Structure, Height of a Tree in Tree Data Structure, Trees as a Data Structure, Depth of a Node in Tree Data Structure, Complete Binary Tree, Strictly Binary Tree, etc.

Important Questions on Trees

MEDIUM
IMPORTANT

The count of ____ from the root to the node is called the depth of a node.

MEDIUM
IMPORTANT

The height of a _____  is the number of edges on the longest path from that node to a leaf.

EASY
IMPORTANT

The difference between the external path length and the internal path length of a binary tree with n internal nodes is?

HARD
IMPORTANT

50, 70, 60, 20, 90, 10, 40, 100

Construct the BTS

HARD
IMPORTANT

subtree

Mention the root node names of subtree from above tree

MEDIUM
IMPORTANT

The no of external nodes in a full binary tree with n internal nodes is?

EASY
IMPORTANT

A strictly binary tree is a tree in which every leaf node has non-empty left and right subtrees.

MEDIUM
IMPORTANT

A complete binary tree with n leaves always contains _____ nodes.

EASY
IMPORTANT

A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right is called Complete Binary Tree.

MEDIUM
IMPORTANT

The height of a BST is given as h. Consider the height of the tree as the no. of edges in the longest path from root to the leaf. The maximum no. of nodes possible in the tree is?

MEDIUM
IMPORTANT

 In a full binary tree if number of internal nodes is I, then number of leaves L are?

EASY
IMPORTANT

A binary tree is a rooted tree such that every node has at most two or more children. 

MEDIUM
IMPORTANT

Any successor nodes on the path from the leaf node to that node are called the descendants of that node.

MEDIUM
IMPORTANT

leaf node

count the leaf nodes from binary tree

MEDIUM
IMPORTANT

sibling

Count the Sibling nodes in tree

MEDIUM
IMPORTANT

What is the average case time complexity for finding the height of the binary tree?
 

EASY
IMPORTANT

A binary tree, which is completely filled, with the possible exception of the bottom level, which is filled from left to right.

MEDIUM
IMPORTANT

tr

 

Find the height of the tree

MEDIUM
IMPORTANT

tree

 

Find the correct paths

MEDIUM
IMPORTANT

The number of edges from the root to the node is called __________ of the tree.