wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Trees

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.

To represent a hierarchical relationship between elements, which data structure is suitable?

a)

Tree

b)

Linked List

c)

Queue

d)

Graph

2.

In a tree structure, nodes that are not root and not leaf are known as internal nodes.

a)

True

b)

False

3.

In a tree structure, a node is a parent if it has successor nodes

a)

True

b)

False

4.

…………………. is a directed tree in which out-degree of each node is less than or equal to two

a)

Binary tree

b)

Unary tree

c)

Trinary tree

d)

Both Unary and Trinary

5.

An empty tree is also a binary tree.

a)

True

b)

False

6.

In strictly binary tree, the out-degree of every node is either 0 or 2.

a)

True

b)

False

7.

Which of the following statements about binary trees is NOT true?

a)

Every binary tree has at least one node.

b)

Every non-empty tree has exactly one root node.

c)

Every node has at most two children.

d)

Every non-root node has exactly one parent.

8.

Is this a binary search tree?

a)

Yes

b)

No

9.

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

a)

Height

b)

Depth

c)

Length

d)

Width

10.

The number of edges from the node to the deepest leaf is called_________ of the tree.

a)

Height

b)

Depth

c)

Length

d)

Width

11.

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

a)

h = O(log log n)

b)

h = O(n log n)

c)

h = O(n)

d)

h = O(log n)