Step -1 Sort the tasks in decreasing order of profit and if any conflict arises between two or more tasks,resolve them by sorting them on basis of having greater deadline first(Because we have more time to complete the task with greater deadline and same profit).
Step 2- Since Maximum deadline given is 7, so we consider we have 7 time slots ranging from 0-7 where a task Ti having deadline say 2 can be filled in slots either 0-1 or 1-2 and not beyond 2 because this task has deadline of 2 time units, so this task has to be completed by atmost time T=2.
Now according to question, since Each task completes in Unit time, so a single tasks takes only one slot as shown.
Now Take the first task in the list i.e. T3 which has a deadline of 5, so it can be completed in maximum 5 time units, so place it in slot 4-5 which is the maximum deadline by which this task can be completed.
Task T9 with deadline 3 is similarly placed in slot 2-3.
Task T7 with deadline 2 is placed in slot 1-.2.
Now for task T2 having deadline 2 can be placed in either 0-1 or 1-2(Occupied by T7). So T2 will occupy slot 0-1.
Task T5 with deadline 4 is placed in slot 3-4.
Now comes task T4 which has deadline 3 can be put in slots 0-1 or 1-2 or 2-3 and not beyond that.Unfortunately, all such slots are occupied so T4 will be left out.
Task T8 with deadline 7 goes in slot 6-7.
Task T1 with deadline 7 can be placed in slot 5-6.
Now all time slots are full.
So, Task T6 will be left out.
So, option (d) is the answer.