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.
| 1. |
Under what case of Master’s theorem will the recurrence relation of stooge sort fall? |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | it cannot be solved using master’s theorem |
| Answer» B. 2 | |
| 2. |
Matrix A is of order 3*4 and Matrix B is of order 4*5. How many elements will be there in a matrix A*B multiplied recursively. |
| A. | 12 |
| B. | 15 |
| C. | 16 |
| D. | 20 |
| Answer» C. 16 | |
| 3. |
What is the distance between the lines 3x- 4y+7=0 and 3x-4y+5=0? |
| A. | 1 unit |
| B. | 0.5 unit |
| C. | 0.8 unit |
| D. | 0.4 unit |
| Answer» E. | |
| 4. |
Cross product of two vectors can be used to find? |
| A. | area of rectangle |
| B. | area of square |
| C. | area of parallelogram |
| D. | perimeter of rectangle |
| Answer» D. perimeter of rectangle | |
| 5. |
What is the auxiliary space 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» C. o(n) | |
| 6. |
Which of the following operation will give a vector that is perpendicular to both vectors a and b? |
| A. | a x b |
| B. | a.b |
| C. | b x a |
| D. | both a x b and b x a |
| Answer» E. | |
| 7. |
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)) | |
| 8. |
Under what case of Master’s theorem will the recurrence relation of merge sort fall? |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | it cannot be solved using master’s theorem |
| Answer» C. 3 | |
| 9. |
What will be the slope of the line given by ax + by + c = 0? |
| A. | -a/b |
| B. | -b/a |
| C. | -c/a |
| D. | a/c |
| Answer» B. -b/a | |
| 10. |
What is the average running time of a quick sort algorithm? |
| A. | o(n2) |
| B. | o(n) |
| C. | o(n log n) |
| D. | o(log n) |
| Answer» D. o(log n) | |
| 11. |
Who formulated Chan’s algorithm? |
| A. | timothy |
| B. | kirkpatrick |
| C. | frank nielsen |
| D. | seidel |
| Answer» B. kirkpatrick | |
| 12. |
is the class of decision problems that can be solved by non- deterministic polynomial algorithms? |
| A. | np |
| B. | p |
| C. | hard |
| D. | complete |
| Answer» B. p | |
| 13. |
Which of the following equals the a x b ( a and b are two vectors)? |
| A. | – (a x b) |
| B. | a.b |
| C. | b x a |
| D. | – (b x a) |
| Answer» E. | |
| 14. |
is a matching with the largest number of edges. |
| A. | maximum bipartite matching |
| B. | non-bipartite matching |
| C. | stable marriage |
| D. | simplex |
| Answer» B. non-bipartite matching | |
| 15. |
Which of the following is not an Eigen value of the adjacency matrix of the complete bipartite graph? |
| A. | (nm)1/2 |
| B. | (-nm)1/2 |
| C. | nm |
| Answer» E. | |
| 16. |
Kruskal’s algorithm is a |
| A. | divide and conquer algorithm |
| B. | dynamic programming algorithm |
| C. | greedy algorithm |
| D. | approximation algorithm |
| Answer» D. approximation algorithm | |
| 17. |
Master’s theorem is used for? |
| A. | solving recurrences |
| B. | solving iterative relations |
| C. | analysing loops |
| D. | calculating the time complexity of any code |
| Answer» B. solving iterative relations | |
| 18. |
Quick sort follows Divide-and-Conquer strategy. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 19. |
Using logical operator’s instead arithmetic operators saves time and space. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 20. |
Quick sort uses join operation rather than merge operation. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 21. |
Which of the points are closer to each other? |
| A. | p1 and p11 |
| B. | p3 and p8 |
| C. | p2 and p3 |
| D. | p9 and p10 |
| Answer» D. p9 and p10 | |
| 22. |
The time is taken to find the ‘n’ points that lie in a convex quadrilateral is? |
| A. | o(n) |
| B. | o(n log n) |
| C. | o(n2) |
| D. | o(log n) |
| Answer» B. o(n log n) | |
| 23. |
The naive pattern searching algorithm is an in place algorithm. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 24. |
Consider a complete graph G with 4 vertices. The graph G has spanning trees. |
| A. | 15 |
| B. | 8 |
| C. | 16 |
| D. | 13 |
| Answer» D. 13 | |
| 25. |
Chan’s algorithm can be used to compute the lower envelope of a trapezoid. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 26. |
Kadane’s algorithm is used to find |
| A. | longest increasing subsequence |
| B. | longest palindrome subsequence |
| C. | maximum sub-array sum |
| D. | longest decreasing subsequence |
| Answer» D. longest decreasing subsequence | |
| 27. |
The Knapsack problem is an example of |
| A. | greedy algorithm |
| B. | 2d dynamic programming |
| C. | 1d dynamic programming |
| D. | divide and conquer |
| Answer» C. 1d dynamic programming | |
| 28. |
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. | |
| 29. |
How many cases are there under Master’s theorem? |
| A. | 2 |
| B. | 3 |
| C. | 4 |
| D. | 5 |
| Answer» C. 4 | |
| 30. |
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. | |
| 31. |
Prim’s algorithm is a |
| A. | divide and conquer algorithm |
| B. | greedy algorithm |
| C. | dynamic programming |
| D. | approximation algorithm |
| Answer» C. dynamic programming | |
| 32. |
For which of the following inputs would Kadane’s algorithm produce a WRONG output? |
| A. | {1,0,-1} |
| B. | {-1,-2,-3} |
| C. | {1,2,3} |
| D. | {0,0,0} |
| Answer» C. {1,2,3} | |
| 33. |
Consider the graph M with 3 vertices. Its adjacency matrix is shown below. Which of the following is true? |
| A. | graph m has no minimum spanning tree |
| B. | graph m has a unique minimum spanning trees of cost 2 |
| C. | graph m has 3 distinct minimum spanning trees, each of cost 2 |
| D. | graph m has 3 spanning trees of different costs |
| Answer» D. graph m has 3 spanning trees of different costs | |
| 34. |
Which is the worst method of choosing a pivot element? |
| A. | first element as pivot |
| B. | last element as pivot |
| C. | median-of-three partitioning |
| D. | random element as pivot |
| Answer» B. last element as pivot | |
| 35. |
How many recursive calls are there in Recursive matrix multiplication by Strassen’s Method? |
| A. | 5 |
| B. | 7 |
| C. | 8 |
| D. | 4 |
| Answer» C. 8 | |
| 36. |
The running time of Chan’s algorithm is obtained from combining two algorithms. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 37. |
What does the following diagram depict? |
| A. | closest pair |
| B. | convex hull |
| C. | concave hull |
| D. | path compression |
| Answer» C. concave hull | |
| 38. |
To which class does the Euler’s circuit problem belong? |
| A. | p class |
| B. | np class |
| C. | partition class |
| D. | complete class |
| Answer» B. np class | |
| 39. |
Stack can be reversed without using extra space by |
| A. | using recursion |
| B. | using linked list to implement stack |
| C. | using an extra stack |
| D. | it is not possible |
| Answer» C. using an extra stack | |
| 40. |
The running time of Bellmann Ford algorithm is lower than that of Dijkstra’s Algorithm. |
| A. | true |
| B. | false |
| Answer» C. | |
| 41. |
Bellmann ford algorithm provides solution for problems. |
| A. | all pair shortest path |
| B. | sorting |
| C. | network flow |
| D. | single source shortest path |
| Answer» E. | |
| 42. |
Which of the following sorting algorithms is the fastest? |
| A. | merge sort |
| B. | quick sort |
| C. | insertion sort |
| D. | shell sort |
| Answer» C. insertion sort | |
| 43. |
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 | |
| 44. |
Which of the following problems can’t be solved using recursion? |
| A. | factorial of a number |
| B. | nth fibonacci number |
| C. | length of a string |
| D. | problems without base case |
| Answer» E. | |
| 45. |
What is the time complexity of the Wagner–Fischer algorithm where “m” and “n” are the lengths of the two strings? |
| A. | o(1) |
| B. | o(n+m) |
| C. | o(mn) |
| D. | o(nlogm) |
| Answer» D. o(nlogm) | |
| 46. |
Kadane’s algorithm uses which of the following techniques? |
| A. | divide and conquer |
| B. | dynamic programming |
| C. | recursion |
| D. | greedy algorithm |
| Answer» C. recursion | |
| 47. |
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 | |
| 48. |
Which of the following is false about the Kruskal’s algorithm? |
| A. | it is a greedy algorithm |
| B. | it constructs mst by selecting edges in increasing order of their weights |
| C. | it can accept cycles in the mst |
| D. | it uses union-find data structure |
| Answer» D. it uses union-find data structure | |
| 49. |
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) | |
| 50. |
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 | |