GATE | Quiz for Sudo GATE 2021 | Question 16
Which of the following option is correct?
Note – This question is multiple select questions (MSQ).
(A) In a depth-first traversal of a graph G with V vertices, E edges are marked as tree edges. The number of connected components in G is (V – E).
(B) Depth-first search requires O(V^2) time if implemented with adjacency lists
(C) Queue data structure can be used to implement least recently used (LRU) page fault algorithm and Quick short algorithm.
(D) If the queue is implemented with a linked list, keeping track of a front pointer, Only rear pointer s will change during an insertion into an non-empty queue.
Answer: (A) (C) (D)
Explanation: Depth-first search requires O(V+E) time if implemented with adjacency lists.
Only options (A), (B), and (D) are correct.
Quiz of this Question
Please comment below if you find anything wrong in the above post