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
ORof 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
trueif it is possible to select two or more elements whose bitwiseORhas trailing zeros, returnfalseotherwise.
1 | class Solution { |