Given a 32-bit integer x and bit positions l and r (0 is the least significant bit, l <= r), reverse the order of the bits from position l to r inclusive and return the new integer, in constant time.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.