Find K-OR of Array

Given an integer array nums and an integer k, compute the k-OR of the array. For each bit position 0 through 31, that bit is set in the result if at least k elements have that bit set. Return the resulting integer.

Examples
Input: [[7,12,9,8,9,15],4]
Output: 9
Hints

Find K-OR of Array

Given an integer array nums and an integer k, compute the k-OR of the array. For each bit position 0 through 31, that bit is set in the result if at least k elements have that bit set. Return the resulting integer.