wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Data Structures -Trees & Sorting

Total questions: 15

Worksheet time: 11mins

Name
Class
Date
1.
A tree is composed of ____ connected by edges or lines.
a)
Fruit 
b)
Leaf Node
c)
Root Node
d)
Nodes
2.
A Kind of tree where every node in a tree can have at most two children.
a)
Binary Tree
b)
Binary Expression Tree
c)
Tree
d)
Binary Search Tree
3.

Root

a)

data structure similar to a graph, with no loops.

b)

an object in a graph also known as a vertex

c)

a join of relationship between nodes - also know as an arc

d)

the starting node in a rooted tree structure from which all other nodes branch off./

4.

Tree

a)

data structure similar to a graph, with no loops.

b)

an object in a graph also known as a vertex

c)

a join of relationship between nodes - also know as an arc

d)

the starting node in a rooted tree structure from which all other nodes branch off./

5.

How many leaf are there in the tree?

a)

1

b)

3

c)

4

d)

7

6.
In this tree, where would the new value "7" be placed?
a)
On the left "leaf" of "4"
b)
On the right "leaf" of "6"
c)
On the left "leaf" of "15"
d)
Over the top of the current number "5"
7.

Which of these tree traversal methods is used to output the contents of a binary tree in ascending order?

a)

Pre-Order

b)

In-Order

c)

Post-Order

d)

Monastic Orders

8.

What are the 3 depth traversals for a tree data structure?

a)

Pre-, In- and Post-order

b)

Pro-, In- and Past-order

c)

Pre-, Out- and Post-order

d)

Pre-, In- and New-order

9.

Which of the following sequences denotes the post order traversal sequence of the tree?

a)

f e g c d b a

b)

g c b d a f e

c)

g c d b f e a

d)

f e d g c b a

10.

In a tree data structure, any nodes that have no children (where the tree ends) are called ___

a)

boundary nodes

b)

leaf nodes

c)

orphan nodes

d)

terminal nodes

11.

What is the value of the ROOT node in this Tree?

a)

35

b)

24

c)

42

d)

20

12.

Select the correct tree traversal method for the following description:

Root - Left Subtree - Right Subtree

a)

Pre-Order

b)

In-Order

c)

Post-Order

13.
Which of these sorting methods uses "divide and conquer"?
a)
Bubble Sort
b)
Quick Sort
c)
Cocktail Sort
d)
Selection Sort
14.
Quick sort running time depends on the selection of ____________.
a)
Size of array
b)
Pivot element
c)
Sequence of values
d)
None of the above
15.
A Balanced Tree has equal number of items on each subtree.
a)
True
b)
False