Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@VladimirDotsenko I'm not sure I understand you correctly. A priori there is $2^n-1$ subsets you should check this on but it is enough to check on $n$ subsets (each omitting one index). Is that what you meant?