wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Data Structures Quiz No 2

Total questions: 20

Worksheet time: 15mins

Name
Class
Date
1.

Which type of traversal of binary search tree outputs the value in sorted order?

a)

Pre-order

b)

Post-order

c)

In-Order

d)

None

2.

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

3.

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

4.

Which data structure is used for data that links arbitrarily, and includes things like loops?

a)

binary trees

b)

circular trees

c)

graphs

d)

dynamic linked stacks

5.
A tree is composed of ____ connected by edges or lines.
a)
Fruit 
b)
Leaf Node
c)
Root Node
d)
Nodes
6.
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
7.

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

a)

35

b)

24

c)

42

d)

20

8.

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./

9.

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./

10.

How many leaf are there in the tree?

a)

1

b)

3

c)

4

d)

7

11.

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

12.
Root has more left descendants than the right descendants or vice versa.
a)
Balanced Tree
b)
Perfect Tree
c)
Right Tree
d)
Unbalanced Tree
13.

Select the correct tree traversal method for the following description:

Root - Left Subtree - Right Subtree

a)

Pre-Order

b)

In-Order

c)

Post-Order

14.

Select the correct tree traversal method for the following description:

Left Subtree - Root - Right Subtree

a)

Pre-Order

b)

In-Order

c)

Post-Order

15.

Select the correct tree traversal method for the following description:

Left Subtree - Right Subtree - Root

a)

Pre-Order

b)

In-Order

c)

Post-Order

16.
Which of these sorting methods uses "divide and conquer"?
a)
Bubble Sort
b)
Quick Sort
c)
Cocktail Sort
d)
Selection Sort
17.
How do you measure of the time complexity?
a)
Big-O notation
b)
Big-N notation
c)
N notation
d)
Small-O notation
e)
Small-N notation
18.
What does the big-O notation show?
a)
The effectiveness of an algorithm
b)
The amount of time required to solve a particular problem
c)
How difficult a problem is to solve
d)
How many lines of code are required to solve a problem
e)
How quickly a solution can be developed
19.
The Depth First Search traversal of a graph will result into ______________.
a)
Linked List
b)
Queue
c)
Stack
d)
Spanning Tree
20.
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