InterviewDB
Question
Taxi Driver: Maximize Earnings by Scheduling Passenger Trips
phone
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 accessAbout 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 .
More Ziphq Interview Questions
InterviewDB
Catch Me If You Can: Optimal Pursuer Movement on a Grid
InterviewDB
Conditional Check: Evaluate Boolean Expressions with Variables
InterviewDB
Ziphq SWE Phone - Convert Email
InterviewDB
Display Strings: Format and Wrap Text to Fit a Fixed-Width Screen
InterviewDB
Furthest Distance Reachable with Limited Fuel Stops