Flip Bits – Lintcode Java | Welkin Lan
Flip Bits – Lintcode Java
Determine the number of bits required to flip if you want to convert integer n to integer m.
Example
Given n = 31
(11111), m = 14
(01110), return 2
.
Note
Both n and m are 32-bit integers.
Read full article from Flip Bits – Lintcode Java | Welkin Lan
No comments:
Post a Comment