lc 600. Non-negative Integers without Consecutive Ones
100100001000 One[i]: 1XXXXXXXXXXXXX Zero[i]: 1XXXXXXXXXXXXX Zero[i] = zero[i + 1] + one[i + 1]; One[i] = zero[i] One[i] is the number of combination without continuous 11, with MSB 1 Zero[i] is the number of combination without continuous 11, with MSB 0 Then go over from MSB to LSB. If at any position, it has XX00YY,… Read More »