• + 0 comments

    C# solution:

    int max = Convert.ToString(n, 2).Split('0').Max(m => m.Length);