#3670
Maximum Product of Two Integers With No Common Bits
expert · 1220 · lc medium +32 · 15.1% accepted · 99 likes · top 0%
Description
Given an integer array nums, find two distinct indices i and j such that nums[i] & nums[j] == 0 (no shared set bits in binary) and the product nums[i] * nums[j] is as large as possible. Return that maximum product, or 0 if no valid pair exists.
Code
1
2
3