Available question text
Find the length of the shortest non-empty contiguous subarray whose bitwise OR is at least k (return -1 if none). With n up to 2e5 and OR being monotonic when extending a range, the challenge is to design an efficient near-linear solution that tracks set bits across windows to minimize subarray length.
Related questions
Continue with questions that share topics or the same question type.
- Shortest Subarray With OR at Least K I
Coding
- Shortest Subarray with Sum at Least K
Coding · Array · Binary Search · Heap (Priority Queue)
- Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Walk through Kadane's algorithm and explain the O(n) approach.
Coding
- Shortest Subarray to be Removed to Make Array Sorted
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3097. Shortest Subarray With OR at Least K II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source