Maximum Profit in Job Scheduling

We have n jobs, each with a start time, an end time, and a profit. Return the maximum profit you can achieve, ensuring no two jobs overlap. A job can start exactly when another ends.

Constraints

  • 1 <= startTime.length == endTime.length == profit.length <= 5 * 10^4
  • 1 <= startTime[i] < endTime[i] <= 10^9
  • 1 <= profit[i] <= 10^4
Saving… · 3 lines
class Solution:
def maxProfitJobScheduling(self, startTime: List[int], endTime: List[int], profit: List[int]) -> int:

Console

Click Run to execute sample tests.