Simple linear time and constant space solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n    O(N)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n    O(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int n = nums.size();\n        int total= nums[0];\n        for(int i=0;i<n;i++){\n            total&=nums[i];\n        }\n        if(total){\n            return 1;\n        }\n        int current = -1;\n        int ans = 0;\n        for(int i=0;i<n;i++){\n            if(current == -1){\n                current = nums[i];\n            }\n            else{\n                current = current&nums[i];\n            }\n            if(current==0){\n                current= -1;\n                ans++;\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']