One pass. Easy sliding window solution !!
Intuition\nSliding Window\n\n# Approach\n Keep incrementing window size until 0 appears.\n Make another window from next index position to the position where yo
# Intuition\nSliding Window\n\n# Approach\n* Keep incrementing window size until 0 appears.\n* Make another window from next index position to the position where you again encounter 0.\n* Increase the count for every window.\n* Please let me know if you found it easy to understand.\n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int n = nums.size();\n        if(n == 1) return 1;\n        int i = 0, j = 0, count = 0;\n        \n        int operation = nums[i];\n        while(j < n){\n            operation &= nums[j];\n            if(operation == 0){\n                count++;\n                i = j+1;\n                if(i < n) operation = nums[i];\n            }\n            j++;\n        }\n        \n        if(count == 0) count++;\n        return count;\n    }\n};\n```
['C++']