Data Structure and Algorithms (DSA) MCQs with answers Page - 81

Here, you will find a collection of MCQ questions on Data Structure and Algorithms (DSA). Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

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

Admin • 833.24K Points
Coach

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

A

Admin • 833.24K Points
Coach

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

A

Admin • 833.24K Points
Coach

Q. What is the complexity of adding an element to the heap.

  • (A) O(log n)
  • (B) O(h)
  • (C) O(log n) & O(h)
  • (D) O(n)

A

Admin • 833.24K Points
Coach

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

A

Admin • 833.24K Points
Coach

Q. Heap can be used as

  • (A) Priority queue
  • (B) Stack
  • (C) A decreasing order array
  • (D) Normal Array

A

Admin • 833.24K Points
Coach

Q. Which of these best describes an array?

  • (A) A data structure that shows a hierarchical behaviour
  • (B) Container of objects of similar types
  • (C) Arrays are immutable once initialised
  • (D) Array is not a data structure

A

Admin • 833.24K Points
Coach

Q. How do you initialize an array in C?

  • (A) int arr[3] = (1,2,3);
  • (B) int arr(3) = {1,2,3};
  • (C) int arr[3] = {1,2,3};
  • (D) int arr(3) = (1,2,3);

A

Admin • 833.24K Points
Coach

Q. How do you instantiate an array in Java?

  • (A) int arr[] = new int(3);
  • (B) int arr[];
  • (C) int arr[] = new int[3];
  • (D) int arr() = new int(3);

A

Admin • 833.24K Points
Coach

Q. Which of the following is a correct way to declare a multidimensional array in Java?

  • (A) int[] arr;
  • (B) int arr[[]];
  • (C) int[][]arr;
  • (D) int[[]] arr;

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ