Leetcode 1235. Maximum Profit in Job Scheduling
Choose a subset of non-overlapping jobs (jobs may touch at endpoints) to maximize total profit — the classical weighted interval scheduling problem. With up to 5·10^4 jobs, it requires an O(n log n) approach (sort by time and use DP + binary search or a time-indexed map to find the last nonconflicting job).
Asked at:
Airbnb
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid May, 2026
Airbnb
Senior
Late April, 2026
Airbnb
Senior
We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i]. You're given the startTime, endTime and profit arrays, return the maximum profit you can take such that there are no two jobs in the subset with overlapping time range. If you choose a job that ends at time X you will be able to start another job that starts at time X.
Late April, 2026
Airbnb
Senior
Hello Interview Premium
Your account is free and you can post anonymously if you choose.