Topic: Bit Manipulation Problem / Level: advanced

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

Run the code to see the output here...