DAA Bits
DAA Bits
6. What is the best case time complexity of the binary search algorithm? [ ]
7. Worst case is the worst case time complexity of Prim’s algorithm if adjacency matrix is [ ]
used?
A) O(log V) B) O(V2) C) O(E2) D) O(V log E)
9. Kruskal’s Algorithm for finding the Minimum Spanning Tree of a graph is a kind of a [ ]
10. Which of the following methods can be used to solve the Knapsack problem? [ ]
A) Divide And B) Sorting C) Monte-Carlo D) Dynamic
Conquer Algorithm Algorithm Programming
A) Ω B)O C) Θ D) ω
A) to move all disks B)to divide the disks C)to move all disks to D)to divide the disks
to some other rod by equally among the some other rod in equally among three
following rules three rods by random order rods in random order
following rules
4. What is the time complexity of the above recursive implementation of binary search? [ ]
11
12
13
14
Binary Search uses the divide and conquer strategy by dividing the search space into __________ parts.
15
In the greedy approach to solving the Job Sequencing problem, jobs are sorted based on their __________ in
descending order.
16 Kruskal’s algorithm for finding the Minimum Cost Spanning Tree (MST) selects edges in the order of increasing
__________.
17 Prim's algorithm starts from a __________ vertex and grows the MST by repeatedly adding the minimum-
weight edge.
18 Dijkstra's algorithm is used to solve the Single Source Shortest Path problem for graphs with __________
weights.
19 Divide and Conquer is not typically used in classic Single Source Shortest Path problems because they often
rely on __________ or dynamic programming approaches.
20
The __________ problem can be solved using dynamic programming by filling out a table that represents the
maximum profit for different capacities.
11
An algorithm is __________
12 ___ is the method of expressing the lower bound of an algorithm’s running time.
13
In the divide and conquer approach, the problem is divided into __________ subproblems of the same type.
14
In Quick Sort, the pivot element is used to __________ the array into two parts.
15
Strassen's algorithm for matrix multiplication improves over the classical algorithm by using __________
recursive multiplications instead of eight.
16
In the Job Sequencing with Deadlines problem, each job has a __________ and a profit associated with it.
17
A spanning tree of a connected graph is a subgraph that connects all the vertices and has no __________.
18
Kruskal’s algorithm for finding the Minimum Cost Spanning Tree (MST) selects edges in the order of increasing
__________.
19
In the Single Source Shortest Path problem, the goal is to find the shortest path from a given __________ to all
other vertices in a graph.
20
In dynamic programming, the solutions to subproblems are stored in a __________ to avoid recomputation.
****