You are given an array nums of nonnegative integers.
The score of a subarray is defined as the bitwise AND of all its elements. The total score of a split of nums into one or more contiguous subarrays is the sum of the scores of all the subarrays.
Determine the maximum number of contiguous subarrays that nums can be split into such that the total score is minimized.
Note: A subarray is a contiguous sequence of elements within an array.
Constraints:
nums.length
nums[i]
You are given an array nums of nonnegative integers.
The score of a subarray is defined as the bitwise AND of all its elements. The total score of a split of nums into one or more contiguous subarrays is the sum of the scores of all the subarrays.
Determine the maximum number of contiguous subarrays that nums can be split into such that the total score is minimized.
Note: A subarray is a contiguous sequence of elements within an array.
Constraints:
nums.length
nums[i]