The question should further clarify that its asking for largest possible gap between L and R. I first solved it with smallest possible gap between L & R and lost some points unnecessarily.

# Question clarity

**nishtha_2**#2

Size of the gap is not a parameter to be considered that is why not mentioned in question the lexicographical order matters

Example 001100 if you consider size of the gap as largest answer should be 1 6 but the answer is 1 2 because 2 is smaller than 6 although both of then give same nos of maximum 1s on flipping