#2917

Find the K-or of an Array

pupil · 315 · lc easy +21 · 72.7% accepted · 250 likes · top 82%

Description

Given an integer array nums and an integer k, compute the K-or value. The K-or is like a bitwise OR except a bit in the result is 1 only when at least k numbers in nums have that bit set.

Return the K-or of nums.

Code

1
2
3