Interview practice
that feels real.
Think out loud. Write the code. Find your answer.
Full AI-led mock interviews and quick daily reps, with follow-up questions and feedback you can put to work.
Find two numbers in an array that add up to a target.
def two_sum(nums, target): seen = {} for i, number in enumerate(nums): complement = target - number if complement in seen: return [seen[complement], i] seen[number] = i return []Explain the tradeoff, not just the solution.
Explore the tabs, or replay the sample walkthrough.