Skip to main content

A study partner who listens while you code — and talks back.

You know how to solve it. You fall apart explaining it.

Practice explaining code out loud with a coach who talks back — so studying stops feeling like homework and you stop blanking in real interviews.

Try Two Sum free

Text works without an account. Voice needs a free one.

two_sum.py
# Two Sum
# Find two numbers that add to target
# return their indices
# hash map for linear time
# Arrays & Hashing
PythonRun
Coco

Coco

Coach

Sample

This solution passes. Which line keeps one array element from being used twice?

Check for the complement before storing the current index.

Try a code-reading rep

The important line is rarely the cleverest one.

Read a working solution, identify the decision that keeps it correct, then test the plausible inverse.

Why is this check first?

This solution passes. Find the decision that keeps one array element from being used twice, then predict what its inverse breaks.

  1. def two_sum(nums, target):
  2. seen = {}
  3. for i, num in enumerate(nums):
  4. complement = target - num
  5. if complement in seen:
  6. return [seen[complement], i]
  7. seen[num] = i
  8. return []
1. Which decision protects the invariant?
2. Suppose line 7 moves above line 5. What happens?

Do the first rep before you decide. Hear one thing worth tightening.

Start with Two Sum. Text works without an account; voice needs a free one today.