Leetcode 2008. Maximum Earnings From Taxi
Choose a set of non-overlapping rides (you travel one-way and carry at most one passenger) to maximize total profit, where each ride's profit = end - start + tip. This is a weighted interval scheduling problem — pick compatible intervals to maximize sum, typically solved by sorting rides and using DP with binary search / a map for efficient lookup.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.