Code, with what to say as you write it
Capture the problem from your screen and get a working solution. Each key line comes with a short note you can say out loud, so you explain your thinking instead of typing in silence.
Ask a follow-up, or use Check for Errors to review the code already on screen.
# two sum, one pass
def two_sum(nums, target):
seen = {}
say: a hash map keeps lookups fast
for i, n in enumerate(nums):
if target - n in seen:
return [seen[target - n], i]
seen[n] = i
say: check first, then store