3246. Check if Bitwise OR Has Trailing Zeros
My accepted Python solution to LeetCode problem 3246, Check if Bitwise OR Has Trailing Zeros, running in 0ms.
- Difficulty: Easy
- Python
- Runtime 0ms
- Memory 17.2MB
- Updated
Read the problem on LeetCode View on GitHub
The problem statement is LeetCode’s and stays on their site. What follows is my accepted solution.
Python
Accepted on LeetCode — runtime 0ms, memory 17.2MB, accepted 2026-01-02.
class Solution:
def hasTrailingZeros(self, nums: List[int]) -> bool:
# OR has trailing zeros means result is even
# This requires at least 2 even numbers
even_count = sum(1 for x in nums if x % 2 == 0)
return even_count >= 2