GATE CS 2025, set 2 · Question 38 · Programming and Data Structures · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer
A meld operation on two instances of a data structure combines them into one single instance of the same data structure. Consider the following data structures:
P: Unsorted doubly linked list with pointers to the head node and tail node of the list.
Q: Min-heap implemented using an array.
R: Binary Search Tree.
Which ONE of the following options gives the worst-case time complexities for meld operation on instances of size n of these data structures?
- (A) P: Θ(1), Q: Θ(n), R: Θ(n)
- (B) P: Θ(1), Q: Θ(n log n), R: Θ(n)
- (C) P: Θ(n), Q: Θ(n log n), R: Θ(n²)
- (D) P: Θ(1), Q: Θ(n), R: Θ(n log n)
Answer
Answer (A)
Answer from the official GATE CS 2025 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes