[LeetCode] Split Array Into Maximum Number of Subarrays

1 · · Sept. 30, 2023, 3:32 p.m.
Summary
2871. Split Array Into Maximum Number of Subarrays You are given an array nums consisting of non-negative integers. We define the score of subarray nums[l..r] such that l <= r as nums[l] AND nums[l + 1] AND ... AND nums[r] where AND is the bitwise AND operation. Consider splitting the array into one or more subarrays such that the following conditions are satisfied: E**ach element of the array belongs to exactly** one subarray. The sum of scores of the subarrays is the minimum possible. Retur...