Maximum Profit in Job Scheduling
Try to solve the Maximum Profit in Job Scheduling problem.
We'll cover the following
Statement#
Suppose there are start_time, end_time, and profit, calculate the maximum profit that can be obtained.
Note: Selecting a job that finishes at time
means you can pick the next job that starts at the same time or later.
Constraints:
start_time.lengthend_time.lengthprofit.lengthstart_time[i]end_time[i]profit[i]
Examples#
1 of 3
2 of 3
3 of 3
Understand the problem#
Maximum Profit in Job Scheduling
What is the output if the following start times, end times, and profits of some jobs are given as input?
start_time: [1, 2, 3, 4]
end_time : [3, 4, 5, 6]
profit : [20, 10, 30, 40]
60
50
40
30
Figure it out!#
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Try it yourself#
Implement your solution in the following coding playground.
Solution: Word Break
Solution: Maximum Profit in Job Scheduling