3097. Shortest Subarray With OR at Least K II
You are given an array
nums
of non-negative integers and an integerk
.An array is called special if the bitwise
OR
of all of its elements is at leastk
.Return the length of the shortest special non-empty subarray of
nums
, or return-1
if no special subarray exists.
c++
1 |
|