Binary Number With Alternating Bits Leetcode Solutions Python