Python | BitMask | O(n)
Code\n\nclass Solution:\n    def maxSubarrays(self, nums: List[int]) -> int:\n        mask = nums[0]\n        for num in nums:\n            mask = mask & num\n 
# Code\n```\nclass Solution:\n    def maxSubarrays(self, nums: List[int]) -> int:\n        mask = nums[0]\n        for num in nums:\n            mask = mask & num\n        if mask: return 1\n        curmask = 2**20 - 1\n        res = 0\n        for num in nums:\n            curmask &= num\n            if not curmask:\n                res += 1\n                curmask = 2**20 - 1\n        return res\n                \n            \n            \n            \n        \n        \n        \n        \n```
['Python3']