# GATE Papers >> CSE >> 2016 >> Question No 125

Question No. 125
N items are stored in a sorted doubly linked list. For a delete operation, a pointer is provided to the record to be deleted. For a decrease-key operation, a pointer is provided to the record on which the operation is to be performed.

An algorithm performs the following operations on the list in this order: $\mathrm{\Theta }\left(N\right)$ delete, O(logN) insert, O(logN) find, and $\mathrm{\Theta }\left(N\right)$ decrease-key. What is the time complexity of all these operations put together?

##### Answer : (C) $O\left({N}^{2}\right)$

Solution of Question No 125 of GATE 2016 CSE Paper
 Data Structure used Find Insert Delete Decrease key Overall asymptotic time Sorted doubly linked list O(N logN) O(N logN) O(N) O(N) O(N logN)

Sorted doubly linked list take maximum of of O(N logN) time, but since not present in option.

So, go for nearest value O(N2).