Professional Documents
Culture Documents
Question 2 - Nguyen Tuan Anh - 1607847
Question 2 - Nguyen Tuan Anh - 1607847
To determine if we can assign the programs to channels without conflicts, we need to check if there
are any overlapping time intervals. Let's analyze the given time intervals:
By examining the intervals, we can see that there are overlapping time periods between P1 and P2, P4
and P6, and P5 and P6. Therefore, we cannot assign the programs to channels without conflicts.
Problem 2:
A suitable data structure for priority queues is a binary heap. It provides efficient insertion and
removal of the highest (or lowest) priority element.