Python O(n) 100% faster easy to understand
\n#Try to understand this without using any Brute-force approach. (Its Competitive Programming, Learn as much as you can) :-)\nclass Solution:\n    def concaten
```\n#Try to understand this without using any Brute-force approach. (Its Competitive Programming, Learn as much as you can) :-)\nclass Solution:\n    def concatenatedBinary(self, n: int) -> int:\n        l,ans =0,0\n        for i in range(1,n+1):    \n            if i & (i - 1) == 0:\n                l+=1\n            ans=((ans <<l)|i)%(10**9+7)\n        return(ans)\n```
['Python', 'Python3']