Top 350+ Solved Data Structures (DS) MCQ Questions Answer

From 286 to 300 of 370

Q. 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

  • a. Priority queue

Q. In which of the following self – balancing binary search tree the recently accessed element can beaccessed quickly?

a. AVL tree

b. AA tree

c. Splay tree

d. Red – Black tree

  • c. Splay tree

Q. The minimum height of self balancing binary search tree with n nodes is

a. log2(n)

b. n

c. 2n + 1

d. 2n – 1

  • a. log2(n)

Q. 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

  • a. a tree which is balanced and is a height balanced tree

Q. 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

  • a. to avoid formation of skew trees

Q. Given an empty AVL tree, how would you construct AVL tree when a set of numbers are givenwithout 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

  • b. find the median of the set of elements given, make it as root and construct the tree

Q. 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

  • a. log(n) where n is the number of nodes

Q. What is missing?

a. Height(w-left), x-height

b. Height(w-right), x-height

c. Height(w-left), x

d. Height(w-left)

  • a. Height(w-left), x-height

Q. 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

  • b. AVL tree store balance factor in every node which costs space

Q. 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

  • b. B-tree

Q. 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

  • d. at least (n – 1)/2 keys

Q. trees are B-trees of order 4. They are an isometric of trees.

a. AVL

b. AA

c. 2-3

d. Red-Black

  • d. Red-Black

Q. 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

  • a. logn (k+1) – 1
Subscribe Now

Get All Updates & News