Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1994. The Number of Good Subsets
Count the subsets of nums whose product is a product of distinct primes (i.e., square-free with no repeated prime factors), modulo 1e9+7. With nums length up to 1e5 and values ≤30, the core challenge is using frequency compression and bitmask DP over the ≤10 primes ≤30 (treating 1s multiplicatively).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.