Tap here to switch tabs
Problem
Submissions

Problem: Minimum Impossible OR

med
30 min
Try to solve the Minimum Impossible OR problem.

Statement

You are given an integer array nums.

A positive integer is considered expressible if there exists at least one non empty subsequence of nums such that the bitwise OR of all its elements equals that integer.

Return the minimum positive integer that is not expressible by any subsequence of nums.

Constraints:

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

  • 1≤1 \leq nums[i] ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Impossible OR

med
30 min
Try to solve the Minimum Impossible OR problem.

Statement

You are given an integer array nums.

A positive integer is considered expressible if there exists at least one non empty subsequence of nums such that the bitwise OR of all its elements equals that integer.

Return the minimum positive integer that is not expressible by any subsequence of nums.

Constraints:

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

  • 1≤1 \leq nums[i] ≤109\leq 10^9