Objective Important Questions For MID 2
Objective Important Questions For MID 2
● In recursion, the condition for which the function will stop calling itself is
____________case
●
● Fractional knapsack problem is solved most efficiently by_________the following
algorithm
● If a problem can be broken into subproblems which are reused several times, the
problem possesses ____________ property.( )
a) Overlapping subproblems b) Optimal substructure c) Memoization d) Greedy
● Which of the following algorithms is the best approach for solving Huffman codes? (
)
a) greedy algorithm b) exhaustive search c) divide and conquer algorithm
d) brute force algorithm
● Consider a complete graph G with 4 vertices. The graph G has ____ spanning
trees.( )
a) 15 b) 8 c) 16 d) 13
● Which of the following is not the algorithm to find the minimum spanning tree of the
given graph?( )
a) Boruvka’s algorithm b) Prim’s algorithm c) Kruskal’s algorithm d) Bellman–Ford
algorithm
● 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)
● Fractional knapsack problem is solved most efficiently by which of the following algorithm? ( )
a) Divide and conquer b) Dynamic programming c) Greedy algorithm d) Backtracking