prefix , and of subarray>= and of array
Intuition\n Describe your first thoughts on how to solve this problem. \n\nprefix and \n\n# Code\n\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>&
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\nprefix and \n\n# Code\n```\nclass Solution {\npublic:\n    int maxSubarrays(vector<int>& nums) {\n        int ans=0,ad=nums[0];\n       for(auto el:nums)\n       {\n          ad=ad&el; \n       }\n        if(ad) return 1;\n        int prefix=INT_MAX;\n        for(int i=0;i<nums.size();i++)\n        {\n           prefix=prefix&nums[i];\n            cout<<prefix<<" ";\n            if(prefix==0) {\n              ans++;\n            prefix=INT_MAX;  \n            } \n        }\n        return ans;\n    }\n};\n```
['C++']