2275. Largest Combination With Bitwise AND Greater Than Zero
On This Page
class Solution:
def largestCombination(self, candidates: List[int]) -> int:
res = 0
for i in range(32):
t = 0
for x in candidates:
t += (x >> i) & 1
res = max(res, t)
return res