Tap here to switch tabs
Problem
Submissions

Problem: Partition Array into Two Equal Product Subsets

med
30 min
Try to solve the Partition Array into Two Equal Product Subsets problem.

Statement

Given an integer array nums and an integer target, determine whether nums can be partitioned into two disjoint subsets such that the product of the elements in each subset is equal to target.

Return true if such a partition exists, and false otherwise.

Constraints:

  • 3≤3 \leq nums.length ≤12\leq 12

  • 1≤1 \leq target ≤1015\leq 10^{15}

  • 1≤1 \leq nums[i] ≤100\leq 100

  • All elements of nums are distinct.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Partition Array into Two Equal Product Subsets

med
30 min
Try to solve the Partition Array into Two Equal Product Subsets problem.

Statement

Given an integer array nums and an integer target, determine whether nums can be partitioned into two disjoint subsets such that the product of the elements in each subset is equal to target.

Return true if such a partition exists, and false otherwise.

Constraints:

  • 3≤3 \leq nums.length ≤12\leq 12

  • 1≤1 \leq target ≤1015\leq 10^{15}

  • 1≤1 \leq nums[i] ≤100\leq 100

  • All elements of nums are distinct.