TODAYS solution
class Solution {\n    public int concatenatedBinary(int n) {\n        final long modulo = (long) (1e9 + 7);\n        long result = 0;\n        int binaryDigits 
class Solution {\n    public int concatenatedBinary(int n) {\n        final long modulo = (long) (1e9 + 7);\n        long result = 0;\n        int binaryDigits = 0;\n        for (int i = 1; i <= n; i++) {\n            if ((i & (i - 1)) == 0) binaryDigits++;\n            result = ((result << binaryDigits) + i) % modulo;\n        }\n        return (int) result;\n    }\n}
['Java']