wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DAA

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.

Time complexity of binary search is:

a)

O(n)

b)

O(log n)

c)

O(n log n)

d)

O(1)

2.

Which algorithm uses Divide and Conquer?

a)

Bubble Sort

b)

Merge Sort

c)

Insertion Sort

d)

Selection Sort

3.

A spanning tree connects:

a)

Only some nodes

b)

All vertices with minimum edges

c)

Only leaf nodes

d)

Only cycles

4.

Prim's algorithm starts from:

a)

Any edge

b)

A single vertex

c)

The smallest edge

d)

A random path

5.

Kruskal's algorithm is based on:

a)

Vertex addition

b)

Edge addition in increasing weight order

c)

Depth-first search

d)

Topological sorting

6.

Depth First Search (DFS) uses:

a)

Stack or Recursion

b)

Queue

c)

Heap

d)

Graph matrix

7.

Backtracking is used in solving:

a)

N-Queen problem

b)

Binary Search

c)

Merge Sort

d)

Floyd Algorithm

8.

Which of these problems can be solved using backtracking?

a)

Hamiltonian circuit problem

b)

Knapsack problem

c)

Bubble sort

d)

Binary Search

9.

Dynamic programming is mainly used when:

a)

Subproblems overlap

b)

Problems are independent

c)

No recursion is possible

d)

Randomized solutions are needed

10.

Which of the following uses Dynamic Programming?

a)

Binary Search

b)

Floyd-Warshall Algorithm

c)

Merge Sort

d)

Quick Sort

11.

Dijkstra's algorithm is used to find:

a)

Minimum spanning tree

b)

All pair shortest paths

c)

Single source shortest path

d)

Maximum flow