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

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. Which data structure allows deleting data elements from front and inserting at rear?

  • (A) Stacks.
  • (B) Queues.
  • (C) Dequeues.
  • (D) Binary search tree.

A

Admin • 833.24K Points
Coach

Q. Binary search algorithm cannot be applied to________ concept.

  • (A) unsorted linked list.
  • (B) sorted binary trees.
  • (C) sorted linear array.
  • (D) pointer array.

A

Admin • 833.24K Points
Coach

Q. Graph traversal is different from a tree traversal, because

  • (A) trees are not connected.
  • (B) graphs may have loops.
  • (C) trees have root.
  • (D) None is true as tree is a subset of graph.

A

Admin • 833.24K Points
Coach

Q. Linked lists are suitable for which of the following problems?

  • (A) Insertion sort
  • (B) Binary search
  • (C) Radix sort
  • (D) dequeue.

A

Admin • 833.24K Points
Coach

Q. Identify the data structure which allows deletions at both ends of the list but insertion at only one end___________.

  • (A) Input-restricted dequeue.
  • (B) Output-restricted dequeue.
  • (C) Priority queues.
  • (D) Data structure.

A

Admin • 833.24K Points
Coach

Q. Which of the following data structure is non-linear type?

  • (A) Strings.
  • (B) Lists.
  • (C) Stacks.
  • (D) Hierarchical.

A

Admin • 833.24K Points
Coach

Q. To represent hierarchical relationship between elements, which data structure is suitable?

  • (A) Dequeue.
  • (B) Priority.
  • (C) Tree.
  • (D) Binary tree.

A

Admin • 833.24K Points
Coach

Q. When does the ArrayIndexOutOfBoundsException occur?

  • (A) Compile-time
  • (B) Run-time
  • (C) Not an error
  • (D) None of the mentioned

A

Admin • 833.24K Points
Coach

Q. The depth of a complete binary tree is given by__________.

  • (A) Dn = n log2n.
  • (B) Dn = n log2n+1.
  • (C) Dn = log2n.
  • (D) Dn = log2n+1.

A

Admin • 833.24K Points
Coach

Q. When converting binary tree into extended binary tree, all the original nodes in binary tree are___________.

  • (A) internal nodes on extended tree.
  • (B) external nodes on extended tree.
  • (C) vanished on extended tree.
  • (D) post order traversal.

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