Re: [闲聊] 每日leetcode

楼主: dont   2024-11-07 19:19:38
2275. Largest Combination With Bitwise AND Greater Than Zero
## 思路
记录每个bit的数量, 回传最大值
用count array记录 space是O(N)
把for loop顺序对调就O(1)了
eg. [1,3,4,5]
0001
0011
0100
0101

Links booklink

Contact Us: admin [ a t ] ucptt.com