Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

DAA QUIZ

Question 1

Which of the following searching algorithm is fastest?

Group of answer choices

binary search

linear search

jump search

all are equally fast

Question 2

Where is linear searching used?

Group of answer choices

When the list has only a few elements

Used all the time

When the list has only a few elements and When performing a single
search in an unordered list

When performing a single search in an unordered list

Question 3

Which of the following searching algorithm is used with exponential


sort after finding the appropriate range?
Group of answer choices

Linear search

Fibonacci Search
Jump search

Binary search
Question 4

Which of the following searching algorithm is fastest when the input


array is not sorted but has uniformly distributed values?
Group of answer choices

jump search

binary search

interpolation search

linear search

Question 5
Which of the following is not an application of binary search?
Group of answer choices

To search in unordered list

Debugging

To find the lower/upper bound in an ordered sequence

Union of intervals

Question 6
Which of the following sorting algorithms is the fastest for sorting
small arrays?
Group of answer choices

Shell sort

Quick sort

Heap sort

Insertion sort
Question 71 pts
Which of the following method is used for sorting in merge sort?
Group of answer choices

selection

merging

exchanging
partitioning
Question 8
Which of the following sorting algorithms is the fastest?
Group of answer choices

Quick sort

Shell sort

Insertion sort

Merge sort

Question 91 pts
What is a Rabin and Karp Algorithm?
Group of answer choices

Minimum spanning tree Algorithm

String Matching Algorithm

Approximation Algorithm

Shortest Path Algorithm

Question 101 pts


Kruskal’s algorithm is used to ______
Group of answer choices

find single source shortest path


traverse the graph

find minimum spanning tree

find all pair shortest path algorithm


Question 111 pts
Consider the given graph.

What is the weight of the minimum spanning tree using the


Kruskal’s algorithm?
Group of answer choices

19

23

15

24

Question 121 pts


Which of the following is false about the Kruskal’s algorithm?
Group of answer choices

It is a greedy algorithm

It constructs MST by selecting edges in increasing order of their


weights

It uses union-find data structure

It can accept cycles in the MST


Question 131 pts
Consider the given graph.

What is the weight of the minimum spanning tree using the Prim’s
algorithm,starting from vertex a?
Group of answer choices

27

23

28

11

Question 141 pts


Prim’s algorithm is a ______
Group of answer choices

Approximation algorithm

ivide and conquer algorithm

Dynamic Programming

Greedy algorithm

Question 151 pts


Dijkstra’s Algorithm is used to solve _____________ problems.
Group of answer choices

Network flow

All pair shortest path


Single source shortest path

Sorting
Question 161 pts
Which of the following is the most commonly used data structure for
implementing Dijkstra’s Algorithm?
Group of answer choices

Circular queue

Max priority queue

Stack

Min priority queue

Question 171 pts


In the given graph, identify the shortest path having minimum cost
to reach vertex E if A is the source vertex.

Group of answer choices

a-c-e

a-c-d-e

a-b-e

a-c-d-b-e
Question 181 pts
Which is the correct technique for finding a maximum matching in a
graph?
Group of answer choices

DFS traversal

BFS traversal

Shortest path traversal

Heap order traversal

Question 191 pts


Floyd Warshall Algorithm can be used for finding _____________
Group of answer choices

Single source shortest path

Minimum spanning tree

Transitive closure

Topological sort

Question 201 pts


Which of the problems cannot be solved by backtracking method?
Group of answer choices

travelling salesman problem

n-queen problem

hamiltonian circuit problem

subset sum problem

You might also like