Shortest Subarray OR ≥ K II

You are given an array nums of non-negative integers and an integer k. Return the length of the shortest non-empty subarray whose bitwise OR is at least k. If no such subarray exists, return -1. This version requires an optimized sliding window approach — when the left pointer advances and the OR drops, the window OR must be recomputed.

Examples
Input: [[1,2,3],4]
Output: -1
Hints

Shortest Subarray OR ≥ K II

You are given an array nums of non-negative integers and an integer k. Return the length of the shortest non-empty subarray whose bitwise OR is at least k. If no such subarray exists, return -1. This version requires an optimized sliding window approach — when the left pointer advances and the OR drops, the window OR must be recomputed.