The Disputed Fare
A medium Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- medium
- Seniority
- mid
Interview Prompt
A rider disputed a single charge our billing system assembled from two separate ride legs, and finance needs to point to exactly which legs. Given `fares`, the leg charges in the order they were billed, and a disputed `target` total, return the positions of the two legs whose charges add up to it, or `None` when no two legs account for the total.
Summary
One charge, two legs. Finance needs to know which two.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision