retagged by
1,291 views
0 votes
0 votes

retagged by

2 Answers

1 votes
1 votes
Put the job with maximum profit in last possible slot where it executes before deadline. continue this for other jobs utill u dont find any job that can be executed within deadline. here put p1 first in slot 1-2 then put p4 in slot 0-1.

no more jobs can be scheduled now so profit is 100+27=127
0 votes
0 votes
Ans is 127.

Lets say there is a pie chart having two slots between 0-2 (i.e, 0-1 and 1-2).

According to highest profit, T1 is executed first in the slot 1-2 (say). Next T4 is executed in the slot 0-1. No other jobs can be scheduled after T1, T4. So max profit 100+27=127.

Related questions

4 votes
4 votes
3 answers
1
Lakshman Bhaiya asked Nov 10, 2018
12,301 views
If job $J=(J_{1},J_{2},J_{3},J_{4})$ are given their processing time $T_{i}=(1,1,2,3)$ and deadline are $D_{i}=(3,4,2,3)$ maximum how many job can be done$?$$A)1$ ...
2 votes
2 votes
3 answers
2
0 votes
0 votes
0 answers
3
Sajal Mallick asked Nov 27, 2023
171 views
As we have to select maximal set of “non overlapping” activities. So like job scheduling algo of greedy we can solve it. So according to that complexity must be O(n l...