wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

INTRO TO DSA

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

Computational problems deal with which two main aspects?

a)

Syntax and semantics

b)

Data and operations

c)

Storage and retrieval

d)

Algorithms and flowcharts

2.

Which stage of an ADT concerns how the data is stored?

a)

Specification

b)

Representation

c)

Implementation

d)

Abstraction

3.

Which stage of an ADT specifies what operations can be performed from the user’s point of view?

a)

Representation

b)

Implementation

c)

Specification

d)

Abstraction

4.

Which of the following is an example of an ADT?

a)

Integer

b)

Array

c)

Queue

d)

Character

5.

In recursion, what is the basis case?

a)

The condition that stops recursion

b)

The repeating part of recursion

c)

The input that causes infinite recursion

d)

The loop variable initialization

6.

In recursion, the recursive step refers to:

a)

The smallest possible solution

b)

Rewriting the problem in terms of a smaller version of itself

c)

Declaring variables inside the function

d)

Converting recursion into iteration

7.

Who is considered the origin of the word “Algorithm”?

a)

Alan Turing

b)

Charles Babbage

c)

Abu Ja’far Muhammed Ibn Musa Al-Khwarizmi

d)

John von Neumann

8.

Which of the following is an example of a recursive definition?

a)

x = y + z

b)

Fib(n) = Fib(n-1) + Fib(n-2)

c)

p = q × r

d)

sum = A + B

9.

Which notation describes the worst-case growth rate of an algorithm?

a)
Omega notation
b)
Theta notation
c)
Big O notation
d)
Polynomial notation
10.

Which approach to problem solving breaks down the problem into halves (e.g., PowerR2, SumArrayR3)?

a)

Divide and Conquer

b)

Brute Force

c)

Greedy Algorithm

d)

Dynamic Programming

11.

In the Tower of Hanoi problem, what is NOT allowed?

a)

Moving one disk at a time

b)

Moving disks between pegs

c)

Placing a larger disk on a smaller disk

d)

Using a temporary peg

12.

Which of the following is a difference between iteration and recursion?

a)

Iteration requires a loop; recursion requires a function call to itself

b)

Iteration is always faster than recursion

c)

Recursion cannot solve problems

d)

Iteration cannot use conditions

13.

Backtracking is mainly used in problems like:

a)

Sorting numbers

b)

Searching in arrays

c)

Constraint satisfaction problems (e.g., N-Queens, Sudoku)

d)

Arithmetic calculations

14.

Which of the following best defines an algorithm?

a)

A set of code written in Java

b)

A flowchart representation of a program

c)

A well-defined procedure that transforms input into output

d)

A recursive function only

15.

What does “Programs = Data Structures + Algorithms” imply?

a)

Programs are only algorithms

b)

Programs are only data

c)

Programs combine both data representation and operations

d)

Programs do not use algorithms