The algorithm proposed by the student in the classroom is incorrect mainly due to the fact that it does
not handle cases wherein the end time of one interval is exactly same as the start time of another. This
scenario is illustrated below:
n Q;gqPGhsr n Q;gqtURZPvuwgH[;Y,gHxyRK
Problem No 1
Given: a set of deadlines d1 d2 . dn such that d1 < d2 < d3 < dn. We have an inversion if for
some i and j, di < dj but i is processed before j.
To: Fix all consecutive inversions.
Solution: We know for any given n, there can