• + 1 comment

    I don't think so. Logic seems correct. s (number of ones) is reset to 0 any time a 0 is seen. Otherwise, if new number of ones (s) is greater than previous highest number (t), t is set to s.