

MCQOPTIONS
Saved Bookmarks
This section includes 133 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.
101. |
A self – balancing binary search tree can be used to implement ________ |
A. | Priority queue |
B. | Hash table |
C. | Heap sort |
D. | Priority queue and Heap sort |
Answer» B. Hash table | |
102. |
After which city is tango tree named? |
A. | Vatican City |
B. | Buenos Aires |
C. | New York |
D. | California |
Answer» C. New York | |
103. |
Two balanced binary trees are given with m and n elements respectively. They can be merged into a balanced binary search tree in ____ time. |
A. | O(m+n) |
B. | O(mn) |
C. | O(m) |
D. | O(mlog n) |
Answer» B. O(mn) | |
104. |
Who developed the concept of tango tree? |
A. | Erik Demaine |
B. | Mihai Patrascu |
C. | John Lacono |
D. | All of the mentioned |
Answer» E. | |
105. |
Who is the inventor of AA-Tree? |
A. | Arne Anderson |
B. | Daniel Sleator |
C. | Rudolf Bayer |
D. | Jon Louis Bentley |
Answer» B. Daniel Sleator | |
106. |
Which of the following graph traversals closely imitates level order traversal of a binary tree? |
A. | Depth First Search |
B. | Breadth First Search |
C. | Depth & Breadth First Search |
D. | None of the mentioned |
Answer» C. Depth & Breadth First Search | |
107. |
What is the time complexity for searching k+1 auxiliary trees? |
A. | k+2 O (log (log n)) |
B. | k+1 O (log n) |
C. | K+2 O (log n) |
D. | k+1 O (log (log n)) |
Answer» E. | |
108. |
An AVL tree is a self – balancing binary search tree, in which the heights of the two child sub trees of any node differ by _________ |
A. | At least one |
B. | At most one |
C. | Two |
D. | At most two |
Answer» C. Two | |
109. |
What are the children for node 'w' of a complete-binary tree in an array representation? |
A. | 2w and 2w+1 |
B. | 2+w and 2-w |
C. | w+1/2 and w/2 |
D. | w-1/2 and w+1/2 |
Answer» B. 2+w and 2-w | |
110. |
Using what formula can a parent node be located in an array? |
A. | (i+1)/2 |
B. | (i-1)/2 |
C. | i/2 |
D. | 2i/2 |
Answer» C. i/2 | |
111. |
In a full binary tree if there are L leaves, then total number of nodes N are? |
A. | N = 2L |
B. | N = L + 1 |
C. | N = L – 1 |
D. | N = 2L – 1 |
Answer» E. | |
112. |
A binary tree is balanced if the difference between left and right subtree of every node is not more than ____ |
A. | 1 |
B. | 3 |
C. | 2 |
D. | 0 |
Answer» B. 3 | |
113. |
In an AA-tree, we process split first, followed by a skew. |
A. | True |
B. | False |
Answer» C. | |
114. |
If A ꓵ B (A and B are two clusters) is a singleton set then it is a Merge able cluster. |
A. | True |
B. | False |
Answer» B. False | |
115. |
Which of the dynamic operations are used in Top Tree data structure implementation? |
A. | Link |
B. | Cut |
C. | Expose |
D. | All of the mentioned |
Answer» E. | |
116. |
A treap is a cartesian tree with |
A. | additional value, which is a priority value to the key generated randomly |
B. | additional value, which is a priority value to the key generated sequentially |
C. | additional heap rule |
D. | additional operations like remove a range of elements |
Answer» B. additional value, which is a priority value to the key generated sequentially | |
117. |
What is the space complexity of the post-order traversal in the recursive fashion? (d is the tree depth and n is the number of nodes) |
A. | O(1) |
B. | O(nlogd) |
C. | O(log |
D. | O(d) |
Answer» E. | |
118. |
AA Trees are implemented using? |
A. | Colors |
B. | Levels |
C. | Node size |
D. | Heaps |
Answer» C. Node size | |
119. |
Is partitioning method used by Tango Tree. |
A. | True |
B. | False |
Answer» B. False | |
120. |
What is the time complexity for finding the node at x position where n is the length of the rope? |
A. | O (log n) |
B. | O (n!) |
C. | O (n2) |
D. | O (1) |
Answer» B. O (n!) | |
121. |
Which of the following is the self-adjusting binary search tree? |
A. | AVL Tree |
B. | Splay Tree |
C. | Top Tree |
D. | Ternary Tree |
Answer» C. Top Tree | |
122. |
Which of the following pair's traversals on a binary tree can build the tree uniquely? |
A. | post-order and pre-order |
B. | post-order and in-order |
C. | post-order and level order |
D. | level order and preorder |
Answer» C. post-order and level order | |
123. |
What are the two different operations done in an AA-Tree? |
A. | shift and color |
B. | skew and split |
C. | zig and zag |
D. | enqueue and dequeue |
Answer» C. zig and zag | |
124. |
What is the traversal strategy used in the binary tree? |
A. | depth-first traversal |
B. | breadth-first traversal |
C. | random traversal |
D. | preorder traversal |
Answer» C. random traversal | |
125. |
What will be the height of a balanced full binary tree with 8 leaves? |
A. | 8 |
B. | 5 |
C. | 6 |
D. | 4 |
Answer» E. | |
126. |
What is the space complexity of the in-order traversal in the recursive fashion? (d is the tree depth and n is the number of nodes) |
A. | O(1) |
B. | O(nlogd) |
C. | O(log |
D. | O(d) |
Answer» E. | |
127. |
Binary tree sort implemented using a self balancing binary search tree takes O(n log n) time in the worst case but still it is slower than merge sort. |
A. | True |
B. | False |
Answer» B. False | |
128. |
Which node has the lowest priority in a treap? |
A. | root node |
B. | leaf node |
C. | null node |
D. | centre node |
Answer» B. leaf node | |
129. |
How many randomized binary search trees can be formed by the numbers (1, 3, 2)? |
A. | 2 |
B. | 3 |
C. | 6 |
D. | 5 |
Answer» E. | |
130. |
In postorder traversal of binary tree right subtree is traversed before visiting root. |
A. | True |
B. | False |
Answer» B. False | |
131. |
How many bits would a succinct binary tree occupy? |
A. | n+O(n) |
B. | 2n+O(n) |
C. | n/2 |
D. | n |
Answer» C. n/2 | |
132. |
Which property makes top tree a binary tree? |
A. | Nodes as Cluster |
B. | Leaves as Edges |
C. | Root is Tree Itself |
D. | All of the mentioned |
Answer» E. | |
133. |
Is it possible to perform a split operation on a string in the rope if the split point is in the middle of the string. |
A. | True |
B. | False |
Answer» B. False | |