#3566

Partition Array into Two Equal Product Subsets

expert · 1080 · lc medium +32 · 35.1% accepted · 78 likes · top 13%

Description

Given distinct positive integers in nums and an integer target, determine whether nums can be split into two non-empty, disjoint subsets (covering all elements) where both subsets have a product equal to target.

Return true if possible, false otherwise.

Code

1
2
3