✅ [Python] greedy O(n)
If the cumulative AND-value of the whole array is non-zero then only one subarray is possible, i.e., the whole array. Otherwise, we use a greedy approach and se
If the cumulative AND-value of the whole array is non-zero then only one subarray is possible, i.e., the whole array. Otherwise, we use a greedy approach and separate subarrays once they reach the point of having zero cumulative AND-value.\n\n```python\nclass Solution:\n    def maxSubarrays(self, nums: List[int]) -> int:\n        min_and = reduce(and_, nums)\n        \n        if min_and > 0 : return 1\n        \n        count, mask = 0, 2**32-1\n\n        for n in nums:\n            mask &= n\n            if mask == 0:\n                count += 1\n                mask = 2**32-1\n\n        return count\n```
['Python3']