[Secret Python Answer🤫🐍👌😍]  Sliding Window with Double Dictionary of Binary Count
\nclass Solution:\n    def smallestSubarrays(self, nums: List[int]) -> List[int]:\n\n        def create(m):\n            t = 0\n            for n in m:\n       
```\nclass Solution:\n    def smallestSubarrays(self, nums: List[int]) -> List[int]:\n\n        def create(m):\n            t = 0\n            for n in m:\n                if m[n] > 0:\n                    t = t | (1 << n)\n            return t\n        \n        def add(a,m):\n            ans = bin( a )\n            s = str(ans)[2:]\n            for i, b in enumerate( s[::-1]):\n                if b == \'1\':\n                    m[i] += 1\n\n        def remove(a,m):\n            ans = bin( a )\n            s = str(ans)[2:]\n            for i, b in enumerate( s[::-1]):\n                if b == \'1\':\n                    m[i] -= 1\n        \n        res = []\n\n        \n        n = defaultdict(int)\n        for i in nums:\n            add(i,n)\n\n        \n        m = defaultdict(int)\n        r = 0\n        c = 0\n\n        for i,v in enumerate(nums):\n            # The last check is for if nums[i] == 0, in that case we still want to add to the map\n            while r < len(nums) and (create(m) != create(n) or (c==0 and nums[i] ==0)):\n                add(nums[r],m)\n                r+=1\n                c+=1\n\n            res.append(c)\n\n            remove(nums[i],m)\n            remove(nums[i],n)\n            c-=1\n\n        return res\n```
['Python', 'Python3']