Topic: Bit Manipulation Problem / Level: advanced

Problem: Implement a function to find the longest sequence of alternating bits in the binary representation of a number.

Run the code to see the output here...