InterviewDB Question

Taxi Driver: Maximize Earnings by Scheduling Passenger Trips

Question Details

Problem A taxi driver has a single vehicle and a list of trip requests. Each trip has a start time, end time, and fare. The driver can complete only one trip at a time (trips cannot overlap). Find the maximum total fare the driver can earn. Follow-ups This is the weighted interval scheduling problem — what DP approach solves it optimally? After sorting by end time, how do you efficiently find the latest non-overlapping trip using binary search? What is the time complexity of your solution? Exten…

Full Details

🔒

Unlock all Ziphq questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a reported interview question from a ziphq interview during the phone round.

It covers the following topics: Dynamic Programming, Binary Search, Phone, Coding, Onsite .