Easy Approach ! 💜
Intuition\n Describe your first thoughts on how to solve this problem. \nSimply Check if the AND of all the elements is 0 or not \nIf AND > 1 (ie. not 0) then i
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nSimply Check if the AND of all the elements is 0 or not \nIf AND > 1 (ie. not 0) then it means that we can\'t divide it into subarrays coz if we try to divide the array; then score will become max.\nIf the AND of all the elements is 0 then it means we can divide into subarrays: so now to divide it into subarrays do the foll steps->\n1. do the AND of the numbers and whenever the AND comes 0 simply increase the count of subarray (cnt) and if there are still elements into array then [ele = next element] because you can include one element into only one subarray !! \n\n**Ezy Pzy Solution! If you think its good Do Upvote!**\n\n\n# \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 cnt = 0, ele = nums[0] , mini = nums[0];\n\n        for(auto i: nums){\n            mini &= i;\n        }\n        if(mini > 0)return 1;\n\n        for(int i=0; i<nums.size(); i++){\n            ele &= nums[i];\n            if(ele == 0){\n                cnt++;\n                if(i+1 < nums.size())ele = nums[i+1];\n            }\n\n        }\n        return cnt;\n    }\n};\n```
['C++']