You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given an unsigned integer, swap all odd bits with even bits. For example,
if the given number is 23, then in binary it is 00010111 (even position bits are highlighted), it should be converted to 43 in binary 00101011. where, every even position bit is swapped with adjacent bit on right side, and every odd position bit is swapped with adjacent on left side.