MCQOPTIONS
Saved Bookmarks
This section includes 397 Mcqs, each offering curated multiple-choice questions to sharpen your Computer Science Engineering (CSE) knowledge and support exam preparation. Choose a topic below to get started.
| 301. |
What approach is being followed in Floyd Warshall Algorithm? |
| A. | greedy technique |
| B. | dynamic programming |
| C. | linear programming |
| D. | backtracking |
| Answer» C. linear programming | |
| 302. |
Floyd Warshall’s Algorithm can be applied on |
| A. | undirected and unweighted graphs |
| B. | undirected graphs |
| C. | directed graphs |
| D. | acyclic graphs |
| Answer» D. acyclic graphs | |
| 303. |
Floyd Warshall’s Algorithm is used for solving |
| A. | all pair shortest path problems |
| B. | single source shortest path problems |
| C. | network flow problems |
| D. | sorting problems |
| Answer» B. single source shortest path problems | |
| 304. |
A graph is said to have a negative weight cycle when? |
| A. | the graph has 1 negative weighted edge |
| B. | the graph has a cycle |
| C. | the total weight of the graph is negative |
| D. | the graph has 1 or more negative weighted edges |
| Answer» D. the graph has 1 or more negative weighted edges | |
| 305. |
What is the running time of the Floyd Warshall Algorithm? |
| A. | big-oh(v) |
| B. | theta(v2) |
| C. | big-oh(ve) |
| D. | theta(v3) |
| Answer» E. | |
| 306. |
Bellmann Ford Algorithm is an example for |
| A. | dynamic programming |
| B. | greedy algorithms |
| C. | linear programming |
| D. | branch and bound |
| Answer» B. greedy algorithms | |
| 307. |
Bellmann Ford algorithm was first proposed by |
| A. | richard bellmann |
| B. | alfonso shimbe |
| C. | lester ford jr |
| D. | edward f. moore |
| Answer» C. lester ford jr | |
| 308. |
Bellmann Ford Algorithm can be applied for |
| A. | undirected and weighted graphs |
| B. | undirected and unweighted graphs |
| C. | directed and weighted graphs |
| D. | all directed graphs |
| Answer» D. all directed graphs | |
| 309. |
What is the basic principle behind Bellmann Ford Algorithm? |
| A. | interpolation |
| B. | extrapolation |
| C. | regression |
| D. | relaxation |
| Answer» E. | |
| 310. |
Dijikstra’s Algorithm is more efficient than Bellmann Ford Algorithm. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 311. |
How many times the for loop in the Bellmann Ford Algorithm gets executed? |
| A. | v times |
| B. | v-1 |
| C. | e |
| D. | e-1 |
| Answer» C. e | |
| 312. |
What is the running time of Bellmann Ford Algorithm? |
| A. | o(v) |
| B. | o(v2) |
| C. | o(elogv) |
| D. | o(ve) |
| Answer» E. | |
| 313. |
How many solution/solutions are available for a graph having negative weight cycle? |
| A. | one solution |
| B. | two solutions |
| C. | no solution |
| D. | infinite solutions |
| Answer» D. infinite solutions | |
| 314. |
Bellmann Ford algorithm is used to indicate whether the graph has negative weight cycles or not. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 315. |
Bellmann ford algorithm provides solution for                          problems. |
| A. | all pair shortest path |
| B. | sorting |
| C. | network flow |
| D. | single source shortest path |
| Answer» E. | |
| 316. |
How many priority queue operations are involved in Dijkstra’s Algorithm? |
| A. | 1 |
| B. | 3 |
| C. | 2 |
| D. | 4 |
| Answer» C. 2 | |
| 317. |
Dijkstra’s Algorithm is the prime example for |
| A. | greedy algorithm |
| B. | branch and bound |
| C. | back tracking |
| D. | dynamic programming |
| Answer» B. branch and bound | |
| 318. |
Dijkstra’s Algorithm run on a weighted, directed graph G={V,E} with non-negative weight function w and source s, terminates with d[u]=delta(s,u) for all vertices u in V. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 319. |
The running time of Bellmann Ford algorithm is lower than that of Dijkstra’s Algorithm. |
| A. | true |
| B. | false |
| Answer» C. | |
| 320. |
What is running time of Dijkstra’s algorithm using Binary min- heap method? |
| A. | o(v) |
| B. | o(vlogv) |
| C. | o(e) |
| D. | o(elogv) |
| Answer» E. | |
| 321. |
The maximum number of times the decrease key operation performed in Dijkstra’s algorithm will be equal to |
| A. | total number of vertices |
| B. | total number of edges |
| C. | number of vertices – 1 |
| D. | number of edges – 1 |
| Answer» C. number of vertices – 1 | |
| 322. |
How many times the insert and extract min operations are invoked per vertex? |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| Answer» B. 2 | |
| 323. |
Which of the following is the most commonly used data structure for implementing Dijkstra’s Algorithm? |
| A. | max priority queue |
| B. | stack |
| C. | circular queue |
| D. | min priority queue |
| Answer» E. | |
| 324. |
Which of the following is false about Prim’s algorithm? |
| A. | it is a greedy algorithm |
| B. | it constructs mst by selecting edges in increasing order of their weights |
| C. | it never accepts cycles in the mst |
| D. | it can be implemented using the fibonacci heap |
| Answer» C. it never accepts cycles in the mst | |
| 325. |
Prim’s algorithm can be efficiently implemented using            for graphs with greater density. |
| A. | d-ary heap |
| B. | linear search |
| C. | fibonacci heap |
| D. | binary search |
| Answer» B. linear search | |
| 326. |
The travelling salesman problem can be solved using |
| A. | a spanning tree |
| B. | a minimum spanning tree |
| C. | bellman – ford algorithm |
| D. | dfs traversal |
| Answer» C. bellman – ford algorithm | |
| 327. |
Which of the following algorithms is similar to a quickhull algorithm? |
| A. | merge sort |
| B. | shell sort |
| C. | selection sort |
| D. | quick sort |
| Answer» E. | |
| 328. |
                       is a method of constructing a smallest polygon out of n given points. |
| A. | closest pair problem |
| B. | quick hull problem |
| C. | path compression |
| D. | union-by-rank |
| Answer» C. path compression | |
| 329. |
Which of the following strategies does the following diagram depict? |
| A. | divide and conquer strategy |
| B. | brute force |
| C. | exhaustive search |
| D. | backtracking |
| Answer» C. exhaustive search | |
| 330. |
Rabin Karp algorithm and naive pattern searching algorithm have the same worst case time complexity. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 331. |
Which of the following is similar to Euclidean distance? |
| A. | manhattan distance |
| B. | pythagoras metric |
| C. | chebyshev distance |
| D. | heuristic distance |
| Answer» C. chebyshev distance | |
| 332. |
What is the result of the recurrences which fall under the extended second case of Master’s theorem (let the recurrence be given by T(n)=aT(n/b)+f(n) and f(n)=nc(log n)k? |
| A. | none of the below |
| B. | t(n) = o(nc log n) |
| C. | t(n)= o(nc (log n)k+1 |
| D. | t(n) = o(n2) |
| Answer» D. t(n) = o(n2) | |
| 333. |
What is the result of the recurrences which fall under third case of Master’s theorem (let the recurrence be given by T(n)=aT(n/b)+f(n) and f(n)=nc? |
| A. | none of the below |
| B. | t(n) = o(nc log n) |
| C. | t(n) = o(f(n)) |
| D. | t(n) = o(n2) |
| Answer» D. t(n) = o(n2) | |
| 334. |
We can solve any recurrence by using Master’s theorem. |
| A. | true |
| B. | false |
| Answer» C. | |
| 335. |
What is the result of the recurrences which fall under second case of Master’s theorem (let the recurrence be given by T(n)=aT(n/b)+f(n) and f(n)=nc? |
| A. | none of the below |
| B. | t(n) = o(nc log n) |
| C. | t(n) = o(f(n)) |
| D. | t(n) = o(n2) |
| Answer» C. t(n) = o(f(n)) | |
| 336. |
Recurrence equation formed for the tower of hanoi problem is given by |
| A. | t(n) = 2t(n-1)+n |
| B. | t(n) = 2t(n/2)+c |
| C. | t(n) = 2t(n-1)+c |
| D. | t(n) = 2t(n/2)+n |
| Answer» D. t(n) = 2t(n/2)+n | |
| 337. |
What is the objective of tower of hanoi puzzle? |
| A. | to move all disks to some other rod by following rules |
| B. | to divide the disks equally among the three rods by following rules |
| C. | to move all disks to some other rod in random order |
| D. | to divide the disks equally among three rods in random order |
| Answer» B. to divide the disks equally among the three rods by following rules | |
| 338. |
Recursive approach to find power of a number is preferred over iterative approach. |
| A. | true |
| B. | false |
| Answer» C. | |
| 339. |
What is the least time in which we can raise a number x to power y? |
| A. | o(x) |
| B. | o(y) |
| C. | o(log x) |
| D. | o(log y) |
| Answer» E. | |
| 340. |
Recursive program to raise an integer x to power y uses which of the following algorithm? |
| A. | dynamic programming |
| B. | backtracking |
| C. | divide and conquer |
| D. | greedy algorithm |
| Answer» D. greedy algorithm | |
| 341. |
Can binary search be applied on a sorted linked list in O(Logn) time? |
| A. | no |
| B. | yes |
| Answer» B. yes | |
| 342. |
What is the advantage of iterative code for finding power of number over recursive code? |
| A. | iterative code requires less time |
| B. | iterative code requires less space |
| C. | iterative code is more compiler friendly |
| D. | it has no advantage |
| Answer» C. iterative code is more compiler friendly | |
| 343. |
What is the time complexity of the above recursive implementation of binary search? |
| A. | o(n) |
| B. | o(2n) |
| C. | o(logn) |
| D. | o(n!) |
| Answer» D. o(n!) | |
| 344. |
Consider the array {1,1,1,1,1}. Select the wrong option? |
| A. | iterative linear search can be used to search for the elements in the given array |
| B. | recursive linear search can be used to search for the elements in the given array |
| C. | recursive binary search can be used to search for the elements in the given array |
| D. | no method is defined to search for an element in the given array |
| Answer» E. | |
| 345. |
Which of the following techniques can be used to search an element in an unsorted array? |
| A. | iterative linear search |
| B. | recursive binary search |
| C. | iterative binary search |
| D. | normal binary search |
| Answer» B. recursive binary search | |
| 346. |
What is the number of swaps required to sort the array arr={5,3,2,4,1} using recursive selection sort? |
| A. | 0 |
| B. | 1 |
| C. | 2 |
| D. | 3 |
| Answer» D. 3 | |
| 347. |
Which of the following methods can be used to find the largest and smallest number in a linked list? |
| A. | recursion |
| B. | iteration |
| C. | both recursion and iteration |
| D. | impossible to find the largest and smallest numbers |
| Answer» D. impossible to find the largest and smallest numbers | |
| 348. |
Which of the following methods can be used to find the largest and smallest element in an array? |
| A. | recursion |
| B. | iteration |
| C. | both recursion and iteration |
| D. | no method is suitable |
| Answer» D. no method is suitable | |
| 349. |
What is the average case time complexity of recursive selection sort? |
| A. | o(n) |
| B. | o(n log n) |
| C. | o(n2) |
| D. | o(log n) |
| Answer» D. o(log n) | |
| 350. |
What is the bidirectional variant of selection sort? |
| A. | cocktail sort |
| B. | bogo sort |
| C. | gnome sort |
| D. | bubble sort |
| Answer» B. bogo sort | |