O(N) C++
IntuitionWe can only divide the array into more than 1 subarray if the AND of subarrays are 0.
The answer will always be 1 if AND of subarrays is greater than 0
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
We can only divide the array into more than 1 subarray if the AND of subarrays are 0.
The answer will always be 1 if AND of subarrays is greater than 0 otherwise count subarrays whose AND operation results in 0
# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    int maxSubarrays(vector<int>& nums) {
        int and_of_complete_arr = nums[0];
        int n = nums.size();
        for(int i=1;i<n;i++)
        {
            and_of_complete_arr &=nums[i];
        }
        
        int count = 0;
        int temp_and = nums[0];
        for(int i=0;i<n;i++)
        {
            temp_and &=nums[i];
            if(temp_and==and_of_complete_arr)
            {
                count++;
                if(i<n-1)
                    temp_and = nums[i+1];
            }
        }
        return and_of_complete_arr == 0?count:1;
    }
};
```
['C++']