Problem
You are given n jobs, each with a start time, an end time, and a profit. Select a subset of non-overlapping jobs (a job that ends at time t does not conflict with one that starts at t) that maximizes the total profit.
Input / Output
start[], end[], profit[] of equal length n.Constraints
1 <= n <= 5 x 10^4Example
start = [1,2,3,3], end = [3,4,5,6], profit = [50,10,40,70] -> 120 (jobs 1 and 4).