← All problemsSign in

3688. Bitwise OR of Even Numbers in an Array

LeetCodeArrayBit ManipulationSimulationOpen on judge ↗

You are given an integer array nums. Return the bitwise OR of all even numbers in the array. If there are no even numbers in nums, return 0. Example 1: Input: nums = [1,2,3,4,5,6] Output: 6 Explanation: The even numbers are 2, 4, and 6. Their bitwise OR equals 6. Example 2: Input: nums = [7,9,11] Output: 0 Explanation: There are no even numbers, so the result is 0. Example 3: Input

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start