McqMate
These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Computer Science Engineering (CSE) , Information Technology Engineering (IT) , Bachelor of Science in Computer Science FY (BSc CS) , Bachelor of Science in Information Technology FY (BSc IT) , Bachelor of Computer Applications (BCA) .
Chapters
51. |
Which of the following is a self – balancing binary search tree? |
A. | 2-3 tree |
B. | Threaded binary tree |
C. | AA tree |
D. | Treap |
Answer» C. AA tree |
52. |
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» A. Priority queue |
53. |
In which of the following self – balancing binary search tree the recently accessed element can be accessed quickly? |
A. | AVL tree |
B. | AA tree |
C. | Splay tree |
D. | Red – Black tree |
Answer» C. Splay tree |
54. |
The minimum height of self balancing binary search tree with n nodes is |
A. | log2(n) |
B. | n |
C. | 2n + 1 |
D. | 2n – 1 |
Answer» A. log2(n) |
55. |
What is an AVL tree? |
A. | a tree which is balanced and is a height balanced tree |
B. | a tree which is unbalanced and is a height balanced tree |
C. | a tree with three children |
D. | a tree with atmost 3 children |
Answer» A. a tree which is balanced and is a height balanced tree |
56. |
Why we need to a binary tree which is height balanced? |
A. | to avoid formation of skew trees |
B. | to save memory |
C. | to attain faster memory access |
D. | to simplify storing |
Answer» A. to avoid formation of skew trees |
57. |
What is the maximum height of an AVL tree with p nodes? |
A. | p |
B. | log(p) |
C. | log(p)/2 |
D. | P⁄2 |
Answer» B. log(p) |
58. |
Given an empty AVL tree, how would you construct AVL tree when a set of numbers are given without performing any rotations? |
A. | just build the tree with the given input |
B. | find the median of the set of elements given, make it as root and construct the tree |
C. | use trial and error |
D. | use dynamic programming to build the tree |
Answer» B. find the median of the set of elements given, make it as root and construct the tree |
59. |
What maximum difference in heights between the leafs of a AVL tree is possible? |
A. | log(n) where n is the number of nodes |
B. | n where n is the number of nodes |
C. | 0 or 1 |
D. | atmost 1 |
Answer» A. log(n) where n is the number of nodes |
60. |
What is missing? |
A. | Height(w-left), x-height |
B. | Height(w-right), x-height |
C. | Height(w-left), x |
D. | Height(w-left) |
Answer» A. Height(w-left), x-height |
61. |
Why to prefer red-black trees over AVL trees? |
A. | Because red-black is more rigidly balanced |
B. | AVL tree store balance factor in every node which costs space |
C. | AVL tree fails at scale |
D. | Red black is more efficient |
Answer» B. AVL tree store balance factor in every node which costs space |
62. |
Which of the following is the most widely used external memory data structure? |
A. | AVL tree |
B. | B-tree |
C. | Red-black tree |
D. | Both AVL tree and Red-black tree |
Answer» B. B-tree |
63. |
B-tree of order n is a order-n multiway tree in which each non-root node contains |
A. | at most (n – 1)/2 keys |
B. | exact (n – 1)/2 keys |
C. | at least 2n keys |
D. | at least (n – 1)/2 keys |
Answer» D. at least (n – 1)/2 keys |
64. |
A B-tree of order 4 and of height 3 will have a maximum of keys. |
A. | 255 |
B. | 63 |
C. | 127 |
D. | 188 |
Answer» A. 255 |
65. |
Five node splitting operations occurred when an entry is inserted into a B-tree. Then how many nodes are written? |
A. | 14 |
B. | 7 |
C. | 11 |
D. | 5 |
Answer» C. 11 |
66. |
trees are B-trees of order 4. They are an isometric of trees. |
A. | AVL |
B. | AA |
C. | 2-3 |
D. | Red-Black |
Answer» D. Red-Black |
67. |
What is the best case height of a B-tree of order n and which has k keys? |
A. | logn (k+1) – 1 |
B. | nk |
C. | logk (n+1) – 1 |
D. | klogn |
Answer» A. logn (k+1) – 1 |
68. |
Which of the following is true? |
A. | larger the order of B-tree, less frequently the split occurs |
B. | larger the order of B-tree, more frequently the split occurs |
C. | smaller the order of B-tree, more frequently the split occurs |
D. | smaller the order of B-tree, less frequently the split occurs |
Answer» A. larger the order of B-tree, less frequently the split occurs |
69. |
In a max-heap, element with the greatest key is always in the which node? |
A. | Leaf node |
B. | First node of left sub tree |
C. | root node |
D. | First node of right sub tree |
Answer» C. root node |
70. |
The worst case complexity of deleting any arbitrary node value element from heap is |
A. | O(logn) |
B. | O(n) |
C. | O(nlogn) |
D. | O(n2) |
Answer» A. O(logn) |
71. |
Heap can be used as |
A. | Priority queue |
B. | Stack |
C. | A decreasing order array |
D. | Normal Array |
Answer» A. Priority queue |
72. |
If we implement heap as min-heap, deleting root node (value 1)from the heap. What would be the value of root node after second iteration if leaf node (value 100) is chosen to replace the root at start. |
A. | 2 |
B. | 100 |
C. | 17 |
D. | none |
Answer» A. 2 |
73. |
An array consists of n elements. We want to create a heap using the elements. The time complexity of building a heap will be in order of |
A. | O(n*n*logn) |
B. | O(n*logn) |
C. | O(n*n) |
D. | O(n *logn *logn) |
Answer» B. O(n*logn) |
Done Studing? Take A Test.
Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.