The Target Hunt
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
- L5
Interview Prompt
Given a list of integers and integer target, return all unique [x, y] pairs with x != y (from distinct indices) summing to target, each index used in at most one pair. Preserve discovery order (greedy: sweep left-to-right, for each x pick the smallest index y > x such that x+y = target and y is unclaimed). Return pairs as lists.
Summary
Pairs that hit a target. Every one of them.
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