LeetCode solutions

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

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 0ms, memory 17.2MB, accepted 2026-01-02.

python
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

Source