+1+1+1+1-1target = 3
mediumNeetCode 150

Target Sum

Target Sum is a dynamic programming question: define the state cleanly and the transitions usually follow. Interviewers love it because it reveals your state-and-transition thinking and your edge-case discipline. Don't rush the code—spend your time nailing the state definition first.

Arrays & HashingBacktrackingDynamic Programming
👩‍🏫
👨‍💼

Meet Allison & Tim

Your AI coaches

Practice coding interviews out loud with real-time voice coaching. Your code actually runs.

Free · No sign up · Early access
1Count Ways to Reach Target Summedium
Based onLeetCode

Get this problem sent to your inbox