Gate CS-2015-1 Question Paper With Solutions

Q. 50 An algorithm performs ^logNh1/2 find operations, N insert operations, ^logNh1/2
operations, and ^logNh1/2 decrease-key operations on a set of data items with keys
drawn from a linearly ordered set. For a delete operation, a pointer is provided
to the record that must be deleted. For the decreased-key operation, a pointer is
provided to the record that has its key decreased. Which one of the following data
structures is the most suited for the algorithms to use, if the goal is to achieve the
best total asymptotic complexity considering all the operations ?

(A) Unsorted array

(B) Min-heap

(C) Sorted array

(D) Sorted doubly linked list

Answer: (A)

Explanation:

Gate CS-2015-1 Question Paper With Solutions

Learn More:   Gate CS-2015-3 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here