Partition to K Equal Sum Subsets (Bitmask DP)

Medium · Bit Manipulation · about 30 minutes

Asked at LinkedIn, Google, Amazon.

Given an array nums of positive integers (length at most 16) and an integer k, return true if the array can be divided into k non-empty subsets with equal sums.

Related guides