Target Sum
Let's solve the Target Sum problem using Dynamic Programming.
Statement
Given an array of positive integers, arr
, and a target, T
, build an expression using these numbers by inserting a T
.
For example, considering an array [1, 1] and a target 0, we can build the following expressions:
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.