MCQOPTIONS
Saved Bookmarks
This section includes 89 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures and Algorithms knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
How many child nodes does each node of K-ary Tree contain? |
| A. | 2 |
| B. | 3 |
| C. | more than k |
| D. | at most k |
| Answer» E. | |
| 52. |
Every graph has only one minimum spanning tree. |
| A. | True |
| B. | False |
| Answer» C. | |
| 53. |
Prim's algorithm is also known as __________ |
| A. | Dijkstra-Scholten algorithm |
| B. | Borůvka's algorithm |
| C. | Floyd-Warshall algorithm |
| D. | DJP Algorithm |
| Answer» E. | |
| 54. |
In which year was Van Emde Boas tree invented? |
| A. | 1972 |
| B. | 1973 |
| C. | 1974 |
| D. | 1975 |
| Answer» E. | |
| 55. |
Can child node be always called Leaf node in the K-ary tree? |
| A. | True |
| B. | False |
| Answer» C. | |
| 56. |
Prim's algorithm resembles Dijkstra's algorithm. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 57. |
The 2d search tree has the simple property that branching on odd levels is done with respect to the first key. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 58. |
In what time can a 2-d tree be constructed? |
| A. | O(N) |
| B. | O(N log N) |
| C. | O(N2) |
| D. | O(M log N) |
| Answer» C. O(N2) | |
| 59. |
Does Van Emde Boas data structure perform all operation in O (log (log M)) time where M = 2m. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 60. |
Who invented k-d trees? |
| A. | Arne Andersson |
| B. | Jon Bentley |
| C. | Jon Von Newmann |
| D. | Rudolf Bayer |
| Answer» C. Jon Von Newmann | |
| 61. |
What is the run time of finding the nearest neighbour in a k-d tree? |
| A. | O(2+ log N) |
| B. | O( log N) |
| C. | O(2d log N) |
| D. | O( N log N) |
| Answer» D. O( N log N) | |
| 62. |
How many properties will an equivalent relationship satisfy? |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | 4 |
| Answer» D. 4 | |
| 63. |
How many extra nodes are there in Full ternary tree than a complete ternary tree? |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | Both have same number of nodes |
| Answer» E. | |
| 64. |
What is the depth of any tree if the union operation is performed by height? |
| A. | O(N) |
| B. | O(log N) |
| C. | O(N log N) |
| D. | O(M log N) |
| Answer» C. O(N log N) | |
| 65. |
On which abstract data type does van Emde Boas tree performs the operation? |
| A. | Tree |
| B. | Linked List |
| C. | Heap |
| D. | Associative Array |
| Answer» E. | |
| 66. |
How many prime concepts are available in nearest neighbour search in a kd tree? |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | 4 |
| Answer» D. 4 | |
| 67. |
++a*bc*+defg is an? |
| A. | postfix expression |
| B. | infix expression |
| C. | prefix expression |
| D. | invalid expression |
| Answer» D. invalid expression | |
| 68. |
What is the worst-case running time of unions done by size and path compression? |
| A. | O(N) |
| B. | O(log * N) |
| C. | O(N log N) |
| D. | O(M log* N) |
| Answer» E. | |
| 69. |
Can child node be always called Leaf node in the ternary tree? |
| A. | True |
| B. | False |
| Answer» C. | |
| 70. |
An expression tree's nodes can be deleted by calling? |
| A. | malloc |
| B. | calloc |
| C. | delete |
| D. | free |
| Answer» E. | |
| 71. |
What is the worst case efficiency for a path compression algorithm? |
| A. | O(N) |
| B. | O(log N) |
| C. | O(N log N) |
| D. | O(M log N) |
| Answer» E. | |
| 72. |
Which of the following is the name of the node having child nodes? |
| A. | Brother |
| B. | Sister |
| C. | Mother |
| D. | Parent |
| Answer» E. | |
| 73. |
What does the other nodes of an expression tree(except leaves) contain? |
| A. | only operands |
| B. | only operators |
| C. | both operands and operators |
| D. | expression |
| Answer» C. both operands and operators | |
| 74. |
An expression tree is created using? |
| A. | postfix expression |
| B. | prefix expression |
| C. | infix expression |
| D. | paranthesized expression |
| Answer» B. prefix expression | |
| 75. |
What is the time taken for a range query for a perfectly balanced tree? |
| A. | O(N) |
| B. | O(log N) |
| C. | O(√N+M) |
| D. | O(√N) |
| Answer» D. O(√N) | |
| 76. |
Insertion into a 2-d tree is a trivial extension of insertion into a binary search tree. |
| A. | true |
| B. | false |
| Answer» B. false | |
| 77. |
What is the other name or Van Emde Boas Tree data structure? |
| A. | Van Emde Boas Array |
| B. | Van Emde Boas Stack |
| C. | Van Emde Boas Priority Queue |
| D. | Van Emde Boas Heap |
| Answer» D. Van Emde Boas Heap | |
| 78. |
What is the time complexity for finding a maximum and minimum integer in Van Emde Boas data structure? |
| A. | O (log M!) |
| B. | O (M!) |
| C. | O (1) |
| D. | O (log (log M)) |
| Answer» D. O (log (log M)) | |
| 79. |
What is the condition for an equivalence relation if two cities are related within a country? |
| A. | the two cities should have a one-way connection |
| B. | the two cities should have a two-way connection |
| C. | the two cities should be in different countries |
| D. | no equivalence relation will exist between two cities |
| Answer» C. the two cities should be in different countries | |
| 80. |
If all the weights of the graph are positive, then the minimum spanning tree of the graph is a minimum cost subgraph. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 81. |
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 | |
| 82. |
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 | |
| 83. |
Consider a undirected graph G with vertices { A, B, C, D, E}. In graph G, every edge has distinct weight. Edge CD is edge with minimum weight and edge AB is edge with maximum weight. Then, which of the following is false? |
| A. | Every minimum spanning tree of G must contain CD |
| B. | If AB is in a minimum spanning tree, then its removal must disconnect G |
| C. | No minimum spanning tree contains AB |
| D. | G has a unique minimum spanning tree |
| Answer» D. G has a unique minimum spanning tree | |
| 84. |
Prim's algorithm is a ______ |
| A. | Divide and conquer algorithm |
| B. | Greedy algorithm |
| C. | Dynamic Programming |
| D. | Approximation algorithm |
| Answer» C. Dynamic Programming | |
| 85. |
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 | |
| 86. |
What is the time complexity of Kruskal's algorithm? |
| A. | O(log V) |
| B. | O(E log V) |
| C. | O(E2) |
| D. | O(V log E) |
| Answer» C. O(E2) | |
| 87. |
Kruskal's algorithm is best suited for the sparse graphs than the prim's algorithm. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 88. |
Kruskal's algorithm is best suited for the dense graphs than the prim's algorithm. |
| A. | True |
| B. | False |
| Answer» C. | |
| 89. |
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) | |