Practice Check if Bitwise OR Has Trailing Zeros
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
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 of 4, which is "100", has two trailing zeros. Return true if it is possible to select two or more elements whose bitwise OR has trailing zeros, return false otherwise.
Source: Check if Bitwise OR Has Trailing Zeros on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
nums = [1,2,3,4,5]
true
# Example 2
nums = [2,4,8,16]
true
# Example 3
nums = [1,3,5,7,9]
false
Constraints
Related LeetCode Problems
Practice more problems similar to Check if Bitwise OR Has Trailing Zeros.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.