Tap here to switch tabs
Problem
Submissions

Problem: Partition Array into Two Equal Product Subsets

Partition Array into Two Equal Product Subsets asks whether an integer array can be partitioned into two disjoint subsets, with each subset's product equal to a given target.

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

Partition Array into Two Equal Product Subsets asks whether an integer array can be partitioned into two disjoint subsets, with each subset's product equal to a given target.

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.