Put a + or a - in front of every number of nums. Return the number of ways to make the total equal target.
For nums = [1, 1, 1, 1, 1] and target = 3 the answer is 5.
Example 1
Input:
find_target_sum_ways([1, 1, 1, 1, 1], 3)
Output:
5
Example 2
Input:
find_target_sum_ways([1], 1)
Output:
1
0 <= len(nums) <= 1000 <= nums[i] <= 100-10**4 <= target <= 10**4No results yet
Run your code to check it against the examples, or submit to run every test.