Easy to understand solution without any tricks :)
Intuition\n\nInspired by @loveshverma_\n\n https://leetcode.com/problems/split-array-into-maximum-number-of-subarrays/solutions/4111160/without-zero-and-intuiti
# Intuition\n\nInspired by @loveshverma_\n\n https://leetcode.com/problems/split-array-into-maximum-number-of-subarrays/solutions/4111160/without-zero-and-intuition/\n\nThe minimum possible score would be the AND of whole array since whenever and reduces the number of set bits in a number hence having more numbers in the subarray will reduce the overall AND value of the subarray.\n\nOnce we have the minimumAnd, we compute the suffixAnd of the array and try to split the arrays so that overall score still equals the minAnd.\n\nAt each index we compute the currentAND and see if the sum of suffix array and currentAnd it equals the minAnd. \n\nIf it does then we can split the array at current point and then try to split the remaining array as much as possible in a similar way.\n\n\n\n# Complexity\n- Time complexity: O(n)\n\n- Space complexity: O(n)\n\n# Code\n```\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int n = nums.size();\n\n        int minAnd = nums[0];\n        for(auto i:nums) minAnd = minAnd & i;\n\n        int suffixAnd[n+1];\n        suffixAnd[n] = 0;\n        suffixAnd[n-1] = nums[n-1];\n        for(int i = n-2;i>=0;i--) {\n            suffixAnd[i] = suffixAnd[i+1] & nums[i];\n        }\n        int res = 0;\n        int curr = INT_MAX;\n        for(int i=0;i<n;i++) {\n            curr = curr & nums[i];\n            if(curr + suffixAnd[i+1] == minAnd) {\n                res++;\n                minAnd -= curr;\n                curr = INT_MAX;\n            } \n        }\n        return res;\n    }\n};\n```
['C++']