The Online Elite
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
- L4
Interview Prompt
Given merchants (list of dicts with merchant_id and name), payments (list of dicts with merchant_id, amount, mode), and integer top_n, filter payments to mode = 'online'. Per merchant_id, sum amount. Rank merchants by that sum descending. Take the top_n merchants. Return the average of all online payment amounts belonging to those top-n merchants as a single float.
Summary
The top performers are hiding in the data.
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