10031. Check if Bitwise OR Has Trailing Zeros
You are given an array of positive integers
nums
.You have to check if it is possible to select two or more elements in the array such that the bitwise
OR
of the selected elements has at least one trailing zero in its binary representation.For example, the binary representation of
5
, which is"101"
, does not have any trailing zeros, whereas the binary representation of4
, which is"100"
, has two trailing zeros.Return
true
if it is possible to select two or more elements whose bitwiseOR
has trailing zeros, returnfalse
otherwise.
1 | class Solution { |