DataDriven
LearnPracticeInterviewDiscussDailyJobs

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 that our billing system actually 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, give back the positions of the two legs whose charges add up to it, with the earlier leg first. When more than one such pair exists, return the one that completes earliest as you read left to right, and return `None` when no two legs account for the total.

Summary

One charge, two legs. Finance needs to know which two.

How This Interview Works

  1. Read the vague prompt (just like a real interview)
  2. Ask clarifying questions to the AI interviewer
  3. Write your python solution with real code execution
  4. Get instant feedback and a hire/no-hire decision

Related

  • All Mock Interviews
  • Practice Mode (untimed)
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Practice Problems
  • Daily Challenge