even and odd to 0.i to 0.n is not 0:
a. Check if the least significant bit of n is 1 using n & 1.
b. If i is even and the bit is 1, increment even.
c. If i is odd and the bit is 1, increment odd.
d. Right shift n by 1 to move to the next bit.
e. Increment the index i.[even, odd].