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

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. A normal queue, if implemented using an array of size MAX_SIZE, gets full when

  • (A) Rear = MAX_SIZE – 1
  • (B) Front = (rear + 1)mod MAX_SIZE
  • (C) Front = rear + 1
  • (D) Rear = front

A

Admin • 833.24K Points
Coach

Q. Queues serve major role in

  • (A) Simulation of recursion
  • (B) Simulation of arbitrary linked list
  • (C) Simulation of limited resource allocation
  • (D) Simulation of heap sort

A

Admin • 833.24K Points
Coach

Q. With what data structure can a priority queue be implemented?

  • (A) Array
  • (B) List
  • (C) Heap
  • (D) Tree

A

Admin • 833.24K Points
Coach

Q. Which of the following is not an application of priority queue?

  • (A) Huffman codes
  • (B) Interrupt handling in operating system
  • (C) Undo operation in text editors
  • (D) Bayesian spam filter

A

Admin • 833.24K Points
Coach

Q. What is the time complexity to insert a node based on key in a priority queue?

  • (A) O(nlogn)
  • (B) O(logn)
  • (C) O(n)
  • (D) O(n2)

A

Admin • 833.24K Points
Coach

Q. What is not a disadvantage of priority scheduling in operating systems?

  • (A) A low priority process might have to wait indefinitely for the CPU
  • (B) If the system crashes, the low priority systems may be lost permanently
  • (C) Interrupt handling
  • (D) Indefinite blocking

A

Admin • 833.24K Points
Coach

Q. Which of the following is not an advantage of priority queue?

  • (A) Easy to implement
  • (B) Processes with different priority can be efficiently handled
  • (C) Applications with differing requirements
  • (D) Easy to delete elements in any case

A

Admin • 833.24K Points
Coach

Q. What is the time complexity to insert a node based on position in a priority queue?

  • (A) O(nlogn)
  • (B) O(logn)
  • (C) O(n)
  • (D) O(n2)

A

Admin • 833.24K Points
Coach

Q. What are the applications of dequeue?

  • (A) A-Steal job scheduling algorithm
  • (B) Can be used as both stack and queue
  • (C) To find the maximum of all sub arrays of size k
  • (D) To avoid collision in hash tables

A

Admin • 833.24K Points
Coach

Q. Which of the following properties is associated with a queue?

  • (A) First In Last Out
  • (B) First In First Out
  • (C) Last In First Out
  • (D) Last In Last Out

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