Largest Subset with Positive Bitwise AND

Given an array of positive integers candidates of length n, choose a non-empty subset such that the bitwise AND of every element in the subset is greater than 0.

Return the maximum possible...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: