Top 350+ Solved Data Structures (DS) MCQ Questions Answer
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
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
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)
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
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
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
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–
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
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
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)
Q. The following given tree is an example for?
a. Binary tree
b. Binary search tree
c. Fibonacci tree
d. none
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