Code
The highlighted line runs next. The pill shows the live values in the running call.
Variables
The data structures the code is building
32-bit registers
Bit 31 on the left, bit 0 on the right
You are given an unsigned integer n that fits in 32 bits. Return the number of 1 bits in its binary representation (its Hamming weight).
The highlighted line runs next. The pill shows the live values in the running call.
The data structures the code is building
Bit 31 on the left, bit 0 on the right
n is at most 32 bits wide, so every solution is O(1). The highlighted row is the solution being traced.
Keyboard: ← → step, Space play or pause. n from 0 to 2³¹ − 1.