OR subset MEX

Revision en1, by lee5, 2021-12-03 14:36:10

Can someone help me with this problem? Given an array of integers. Find the smallest positive integer which cannot be formed by performing bitwise OR on all the elements of a chosen subset. I don't know the range of n(size of the array), but what can be the most optimized approach?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English lee5 2021-12-03 14:36:10 298 Initial revision (published)