An algorithm performs \((\log N)^{1/2}\) find operations, \(N\) insert…

PYQ GATE 2015

An algorithm performs (log⁡N)1/2(\log N)^{1/2} find operations, NN insert operations, (log⁡N)1/2(\log N)^{1/2} delete operations, and (log⁡N)1/2(\log N)^{1/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 decrease-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 algorithm to use, if the goal is to achieve the best total asymptotic complexity considering all the operations?

  1. A.

    Unsorted array

  2. B.

    Min-heap

  3. C.

    Sorted array

  4. D.

    Sorted doubly linked list

Attempted by 208 students.

Sign up free to check your answer

Sign up free

Explore the full course: Algorithms

Loading lesson…