# Bit sequence

Hello everyone. I start by saying that I don't want to solve any task but at least understand the reasoning to find a solution algorithm. Practically I was given a problem that says that given a sequence of 11 bits such as 00001111111, I have to check which sub-sequence (if the one formed by 0 or 1) is the one with the most bits. Thanks in advance and sorry for the english.

3/24/2020 8:56:48 PM

Computer_King206 Answers

New AnswerIn short you have to find the continuous sequence of 0 or 1 having the biggest length e.g. 000111 - both 0 and 1 have same length 3 0001110000111 - 0 has the biggest sequence of length 4 11000011111 - 1 has a biggest continuous sequence of length 5

Oma Falk so if for example I enter 10001111101 and then 11111100000 I have to check for example in the first code what was the most present number of bits