You are given an integer array nums and an integer k, return true if it is possible to divide this array into k non-empty subsets whose sums are all equal.
Example 1:
Input: nums = [2,4,1,3,5], k = 3
Output: trueExplanation: Given array can be divided into three subsets [5], [2,3], [4,1].
Example 2:
Input: nums = [1,2,3,4], k = 3
Output: falseConstraints:
1 <= k <= nums.length <= 161 <= nums[i] <= 10,000[1, 4].