← Questions

Target sum

0
AmazonCodingLast asked Aug 2025

Put a + or - in front of every number in an array and count how many ways the expression adds up to a target. Write the recursive solution, then turn it into a dynamic program over sums.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding