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

From 226 to 240 of 370

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

  • c. Interrupt handling

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

  • d. Easy to delete elements in any case

Q. What is a dequeue?

a. A queue with insert/delete defined for both front and rear ends of the queue

b. A queue implemented with a doubly linked list

c. A queue implemented with both singly and doubly linked lists

d. A queue with insert/delete defined for front side of the queue

  • a. A queue with insert/delete defined for both front and rear ends of the queue

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

  • d. To avoid collision in hash tables

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

  • b. First In First Out

Q. In a circular queue, how do you increment the rear end of the queue?

a. rear++

b. (rear+1) % CAPACITY

c. (rear % CAPACITY)+1

d. rear–

  • b. (rear+1) % CAPACITY

Q. What is the term for inserting into a full queue known as?

a. overflow

b. underflow

c. null pointer exception

d. program won’t be compiled

  • a. overflow

Q. What is the time complexity of enqueue operation?

a. O(logn)

b. O(nlogn)

c. O(n)

d. O(1)

  • d. O(1)

Q. What is the need for a circular queue?

a. effective usage of memory

b. easier computations

c. to delete elements based on priority

d. implement LIFO principle in queues

  • a. effective usage of memory

Q. What is the space complexity of a linear queue having n elements?

a. O(n)

b. O(nlogn)

c. O(logn)

d. O(1)

  • a. O(n)

Q. The following given tree is an example for?

a. Binary tree

b. Binary search tree

c. Fibonacci tree

d. none

  • a. Binary tree

Q. What is the traversal strategy used in the binary tree?

a. depth-first traversal

b. breadth-first traversal

c. random traversal

d. Priority traversal

  • b. breadth-first traversal
Subscribe Now

Get All Updates & News