wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Data Structures and Algorithms Quiz

Total questions: 14

Worksheet time: 7mins

Name
Class
Date
1.

What is the definition of data structure?

a)

A representation of the logical relationship between individual elements of data

b)

A way of organizing all data items without considering their relationships

c)

A set of instructions to organize data

d)

A method to execute a specific function

2.

Which of the following is a primitive data structure?

a)

Integer

b)

Static

c)

Tree

d)

Graph

3.

What is the purpose of an algorithm?

a)

To solve a particular function through a step-by-step procedure

b)

To analyze the correctness of data structures

c)

To define the basic concepts of Big O notations

d)

To organize data

4.

What is the time complexity of an algorithm?

a)

The amount of space required by the algorithm

b)

The process of defining a formula for memory prediction

c)

The process of determining the total time required for execution

d)

The process of defining a formula for sorting data

5.

Which of the following is an example of a non-primitive data structure?

a)

Integer

b)

Array

c)

Character constants

d)

Graph

6.

What is the space complexity of an algorithm?

a)

The process of defining a formula for sorting data

b)

The process of determining the amount of space required

c)

The process of defining a formula for memory prediction

d)

The process of defining a formula for total time required

7.

What is the main difference between primitive and non-primitive data structures?

a)

Non-primitive data structures are built out of primitive data structures

b)

Primitive data structures are built out of non-primitive data structures

c)

Non-primitive data structures are directly operated upon by machine instructions

d)

Primitive data structures are more sophisticated

8.

What is the purpose of a recursive algorithm?

a)

To define the basic concepts of Big O notations

b)

To execute a specific function

c)

To solve a particular function through a step-by-step procedure

d)

To find the factorial of a given number

9.

What is the complexity that computes the amount of time required by an algorithm?

a)

Space complexity

b)

Time complexity

c)

Searching complexity

d)

Sorting complexity

10.

Which of the following is an example of a primitive data structure?

a)

Tree

b)

Graph

c)

Stack

d)

Integer

11.

What is the purpose of proving the correctness of algorithms during the design phase?

a)

To verify each part of a program as soon as it is developed

b)

To ensure the program will always successfully complete

c)

To prove that the correct output is produced if the program successfully completes

d)

To reuse the proved models as much as possible

12.

What is the main goal of developing an algorithm?

a)

To analyze the correctness of data structures

b)

To solve a particular function through a step-by-step procedure

c)

To define the basic concepts of Big O notations

d)

To organize data

13.

What is the purpose of the initialization step in loop invariance?

a)

To prove that the correct output is produced if the program successfully completes

b)

To ensure the program will always successfully complete

c)

To verify each part of a program as soon as it is developed

d)

To ensure the loop invariant is true prior to the first iteration of the loop

14.

What is the main purpose of the maintenance step in loop invariance?

a)

To prove that the correct output is produced if the program successfully completes

b)

To ensure the program will always successfully complete

c)

To verify each part of a program as soon as it is developed

d)

To maintain the loop invariant after each iteration of the loop