Available question text
Count the number of non-empty subsets whose product is square-free (no prime squared divides it) modulo 1e9+7. With nums[i] ≤ 30 and n ≤ 1000, the core challenge is avoiding repeated prime factors across subset elements—typically solved by counting frequencies and using DP over prime-factor bitmasks (treating 1s separately).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2572. Count the Number of Square-Free Subsets
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source