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.
| 51. |
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) | |
| 52. |
Longest common subsequence is an example of |
| A. | greedy algorithm |
| B. | 2d dynamic programming |
| C. | 1d dynamic programming |
| D. | divide and conquer |
| Answer» C. 1d dynamic programming | |
| 53. |
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) |
| Answer» C. o(e2) | |
| 54. |
Dijikstra’s Algorithm is more efficient than Bellmann Ford Algorithm. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 55. |
The Euler’s circuit problem can be solved in? |
| A. | o(n) |
| B. | o( n log n) |
| C. | o(log n) |
| D. | o(n2) |
| Answer» E. | |
| 56. |
Which of the following sorting algorithms is used along with quick sort to sort the sub arrays? |
| A. | merge sort |
| B. | shell sort |
| C. | insertion sort |
| D. | bubble sort |
| Answer» D. bubble sort | |
| 57. |
What is the worst case time complexity of a quick sort algorithm? |
| A. | o(n) |
| B. | o(n log n) |
| C. | o(n2) |
| D. | o(log n) |
| Answer» D. o(log n) | |
| 58. |
Which of the following methods is the most effective for picking the pivot element? |
| A. | first element |
| B. | last element |
| C. | median-of-three partitioning |
| D. | random element |
| Answer» D. random element | |
| 59. |
What is the time complexity of Z algorithm for pattern searching (m = length of text, n = length of pattern)? |
| A. | o(n + m) |
| B. | o(m) |
| C. | o(n) |
| D. | o(m * n) |
| Answer» B. o(m) | |
| 60. |
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 | |
| 61. |
Consider the following graph. Using Kruskal’s algorithm, which edge will be selected first? |
| A. | gf |
| B. | de |
| C. | be |
| D. | bg |
| Answer» D. bg | |
| 62. |
Which case of master’s theorem can be extended further? |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | no case can be extended |
| Answer» C. 3 | |
| 63. |
Which of the following is called the “ultimate planar convex hull algorithm”? |
| A. | chan’s algorithm |
| B. | kirkpatrick-seidel algorithm |
| C. | gift wrapping algorithm |
| D. | jarvis algorithm |
| Answer» C. gift wrapping algorithm | |
| 64. |
Cross product is a mathematical operation performed between |
| A. | 2 scalar numbers |
| B. | a scalar and a vector |
| C. | 2 vectors |
| D. | any 2 numbers |
| Answer» D. any 2 numbers | |
| 65. |
What is the running time of Chan’s algorithm? |
| A. | o(log n) |
| B. | o(n log n) |
| C. | o(n log h) |
| D. | o(log h) |
| Answer» D. o(log h) | |
| 66. |
Which of the following statements is not a part of Chan’s algorithm? |
| A. | eliminate points not in the hull |
| B. | recompute convex hull from scratch |
| C. | merge previously calculated convex hull |
| D. | reuse convex hull from the previous iteration |
| Answer» C. merge previously calculated convex hull | |
| 67. |
Kruskal’s algorithm can efficiently implemented using the disjoint-set data structure. |
| A. | s1 is true but s2 is false |
| B. | both s1 and s2 are false |
| C. | both s1 and s2 are true |
| D. | s2 is true but s1 is false |
| Answer» E. | |
| 68. |
Which of the following is not a palindromic subsequence of the string “ababcdabba”? |
| A. | abcba |
| B. | abba |
| C. | abbbba |
| D. | adba |
| Answer» E. | |
| 69. |
What is the shortest distance between the line given by -2x + 3y + 4 = 0 and the point (5,6)? |
| A. | 4.5 units |
| B. | 5.4 units |
| C. | 4.3 units |
| D. | 3.3 units |
| Answer» E. | |
| 70. |
Kruskal’s algorithm is used to |
| A. | find minimum spanning tree |
| B. | find single source shortest path |
| C. | find all pair shortest path algorithm |
| D. | traverse the graph |
| Answer» B. find single source shortest path | |
| 71. |
Which of the following is not an Eigen value of the Laplacian matrix of the complete bipartite graph? |
| A. | n + m |
| B. | n |
| C. | n*m |
| Answer» E. | |
| 72. |
Minimum time required to solve tower of hanoi puzzle with 4 disks assuming one move takes 2 seconds, will be |
| A. | 15 seconds |
| B. | 30 seconds |
| C. | 16 seconds |
| D. | 32 seconds |
| Answer» C. 16 seconds | |
| 73. |
Kruskal’s algorithm is best suited for the sparse graphs than the prim’s algorithm. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 74. |
The shortest distance between a line and a point is achieved when? |
| A. | a line is drawn at 90 degrees to the given line from the given point |
| B. | a line is drawn at 180 degrees to the given line from the given point |
| C. | a line is drawn at 60 degrees to the given line from the given point |
| D. | a line is drawn at 270 degrees to the given line from the given point |
| Answer» B. a line is drawn at 180 degrees to the given line from the given point | |
| 75. |
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 | |
| 76. |
What is the worst case time complexity of KMP algorithm for pattern searching (m = length of text, n = length of pattern)? |
| A. | o(n) |
| B. | o(n*m) |
| C. | o(m) |
| D. | o(log n) |
| Answer» D. o(log n) | |
| 77. |
What will be the cross product of the vectors 2i + 3j + k and 3i + 2j + k? |
| A. | i + 2j + k |
| B. | 2i + 3j + k |
| C. | i + j – 5k |
| D. | 2i – j – 5k |
| Answer» D. 2i – j – 5k | |
| 78. |
In general, which of the following methods isn’t used to find the factorial of a number? |
| A. | recursion |
| B. | iteration |
| Answer» B. iteration | |
| 79. |
Cross product is also known as? |
| A. | scalar product |
| B. | vector product |
| C. | dot product |
| D. | multiplication |
| Answer» C. dot product | |
| 80. |
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 | |
| 81. |
Chan’s algorithm is used for computing |
| A. | closest distance between two points |
| B. | convex hull |
| C. | area of a polygon |
| D. | shortest path between two points |
| Answer» C. area of a polygon | |
| 82. |
What will be the slope of the line given by 10x + 5y + 8=0? |
| A. | -5 |
| B. | -2 |
| C. | -1.25 |
| D. | 5 |
| Answer» C. -1.25 | |
| 83. |
7 T (n/2) + 1/n |
| A. | t(n) = o(n) |
| B. | t(n) = o(log n) |
| C. | t(n) = o(n2log n) |
| D. | cannot be solved using master’s theorem |
| Answer» E. | |
| 84. |
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 | |
| 85. |
How many sub arrays does the quick sort algorithm divide the entire array into? |
| A. | one |
| B. | two |
| C. | three |
| D. | four |
| Answer» C. three | |
| 86. |
Kruskal’s algorithm is best suited for the dense graphs than the prim’s algorithm. |
| A. | true |
| B. | false |
| Answer» C. | |
| 87. |
What is the time complexity of Kadane’s algorithm? |
| A. | o(1) |
| B. | o(n) |
| C. | o(n2) |
| D. | o(5) |
| Answer» C. o(n2) | |
| 88. |
Dinic’s algorithm runs faster than the Ford-Fulkerson algorithm. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 89. |
Under what case of Master’s theorem will the recurrence relation of binary search fall? |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | it cannot be solved using master’s theorem |
| Answer» C. 3 | |
| 90. |
If Matrix X is of order A*B and Matrix Y is of order C*D, and B=C then the order of the Matrix X*Y is A*D? |
| A. | true |
| B. | false |
| Answer» B. false | |
| 91. |
How many priority queue operations are involved in Dijkstra’s Algorithm? |
| A. | 1 |
| B. | 3 |
| C. | 2 |
| D. | 4 |
| Answer» C. 2 | |
| 92. |
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 |
| Answer» B. optimal substructure | |
| 93. |
We can solve any recurrence by using Master’s theorem. |
| A. | true |
| B. | false |
| Answer» C. | |
| 94. |
Prim’s algorithm resembles Dijkstra’s algorithm. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 95. |
The longest increasing subsequence problem is a problem to find the length of a subsequence from a sequence of array elements such that the subsequence is sorted in increasing order and it’s length is maximum. This problem can be solved using |
| A. | recursion |
| B. | dynamic programming |
| C. | brute force |
| D. | recursion, dynamic programming, brute force |
| Answer» E. | |
| 96. |
Which is the safest method to choose a pivot element? |
| A. | choosing a random element as pivot |
| B. | choosing the first element as pivot |
| C. | choosing the last element as pivot |
| D. | median-of-three partitioning method |
| Answer» B. choosing the first element as pivot | |
| 97. |
Which of the following factors account more to the cost of Chan’s algorithm? |
| A. | computing a single convex hull |
| B. | locating points that constitute a hull |
| C. | computing convex hull in groups |
| D. | merging convex hulls |
| Answer» D. merging convex hulls | |
| 98. |
When dynamic programming is applied to a problem, it takes far less time as compared to other methods that don’t take advantage of overlapping subproblems. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 99. |
What is the space complexity of the following dynamic programming implementation used to find the minimum number of jumps? |
| A. | o(1) |
| B. | o(n) |
| C. | o(n2) |
| D. | o(5) |
| Answer» C. o(n2) | |
| 100. |
What is the space complexity of Kadane’s algorithm? |
| A. | o(1) |
| B. | o(n) |
| C. | o(n2) |
| D. | none of the mentioned |
| Answer» B. o(n) | |