Multiple choice

A descending priority queue is implemented by using linked list. Which of the following operations is the cheapest?

  1. Traversal

  2. Insertion

  3. Search

  4. Delete-Max

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In a descending priority queue implemented with a linked list (sorted descending), the largest element is at the head. Deleting the max element is a constant time O(1) operation.