Math
1680. Concatenation of Consecutive Binary Numbers
Concatenate the binary representations of 1 to n into one string, interpret it as a binary number, return it mod 1e9+7. (n=3: "1"+"10"+"11" = "11011" = 27.) Build it incrementally: appending a k-bit…
Loading…