# Counting Bits Offset DP **Idea.** bits[i] = bits[i>>1] + (i&1). **Complexity.** State time and space before coding, then justify why the approach beats brute force. **Interview tip.** Restate constraints, give brute force first, then optimize. Trace one small example out loud before coding. *Disclosure: practice note shared by the Linkjob AI team.* For live mock-interview practice see [AI interview assistant](https://www.linkjob.ai/).