Given jobs with [startTime, endTime, profit], find the maximum profit from non-overlapping jobs. Combines sorting + binary search + DP.
Sort by end time. For each job, binary search for the latest non-overlapping previous job. dp[i] = max(dp[i-1], profit[i] + dp[last_non_overlapping]).
💡 Pro tip: Understand this problem deeply — don't just memorize the code. Try explaining the approach out loud as if teaching a friend. If you can explain it simply, you truly understand it!
jobScheduling([1,2,3,3],[3,4,5,6],[50,10,40,70])
120