Medium
Given an array nums and an integer target k, assign a + or - to each number and count the assignments whose sum equals k.
nums
k
+
-
Input: nums = [1,1,1,1,1], k = 3 Output: 5
Input: nums = [1], k = 1 Output: 1