Tap here to switch tabs
Problem
Submissions

Problem: Maximum Product of Two Integers With No Common Bits

Try to solve the Maximum Product of Two Integers With No Common Bits problem.

Statement

Given an integer array nums, find the maximum product of two distinct elements nums[i] and nums[j] such that nums[i] and nums[j] share no common set bits in their binary representations.

Return the maximum product of such a pair. If no two elements share zero common set bits, return 00.

Constraints:

  • 2≤2 \leq nums.length ≤105\leq 10^5

  • 1≤1 \leq nums[i] ≤106\leq 10^6

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Product of Two Integers With No Common Bits

Try to solve the Maximum Product of Two Integers With No Common Bits problem.

Statement

Given an integer array nums, find the maximum product of two distinct elements nums[i] and nums[j] such that nums[i] and nums[j] share no common set bits in their binary representations.

Return the maximum product of such a pair. If no two elements share zero common set bits, return 00.

Constraints:

  • 2≤2 \leq nums.length ≤105\leq 10^5

  • 1≤1 \leq nums[i] ≤106\leq 10^6