Given an integer array nums of length n.
For each index i from n i. Among all these subarrays, determine the minimum length of a subarray whose bitwise OR is equal to the maximum bitwise OR achievable by any subarray starting at i.
Return an integer array answer of length n, where answer[i] is the minimum length of such a subarray starting at index i.
Constraints:
n == nums.length
n
nums[i]
Given an integer array nums of length n.
For each index i from n i. Among all these subarrays, determine the minimum length of a subarray whose bitwise OR is equal to the maximum bitwise OR achievable by any subarray starting at i.
Return an integer array answer of length n, where answer[i] is the minimum length of such a subarray starting at index i.
Constraints:
n == nums.length
n
nums[i]