Maximum Profit in Job Scheduling
Hard
Dynamic Programming
Binary Search
Sorting
Schedule non-overlapping jobs for max profit.
Input: jobs as start,end,profit per line
Output: max profit
Constraints
See problem-specific constraints. Optimized solution required.
Examples
Example 1:
Input: 1,3,50
2,4,10
3,5,40
3,6,70
Output:
Example 2:
Input: 1,3,50
2,4,10
3,5,40
3,6,70
Output:
Hints
Consider a binary search approach.
Think about time complexity.
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console