✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
An operating system has a Priority Queue implemented that when there are resources available takes a task from the queue and executes it. The priority queue is based on the priorities assigned to each task. If you decide to build a heap for the below task list, what will be the correct heap from the list below?
Assume the smallest number in the task priority means it has the higher priority.
| Task | Priority |
|---|---|
| 1 | 30 |
| 2 | 25 |
| 3 | 8 |
| 4 | 42 |
| 5 | 17 |
| 6 | 33 |