Problem Given a non-negative integer, swap the odd and even bits in its binary representation. Example Let's take the number 23 as an example: 1. The binary representation of 23 is 0b10111 (5 bits). 2. After padding with 0, it becomes 0b010111 (6 bit...
Markdown supported · ⌘↵ to post
No responses yet.