scala solution
scala []\nobject Solution {\n  def maxSubarrays(nums: Array[Int]): Int =\n    if(nums.reduce(_ & _) != 0) 1 else\n      LazyList.unfold((0,0,(1<<20)-1)){case (c
```scala []\nobject Solution {\n  def maxSubarrays(nums: Array[Int]): Int =\n    if(nums.reduce(_ & _) != 0) 1 else\n      LazyList.unfold((0,0,(1<<20)-1)){case (cnt,i,mask) =>\n        Option.when(i<nums.length){\n          lazy val mask1 = mask&nums(i)\n          if(mask1==0) (cnt+1, (cnt+1,i+1, (1<<20)-1)) else (cnt, (cnt,i+1, mask1))\n        }\n      }.last\n}\n```
['Greedy', 'Bit Manipulation', 'Scala']