Longest substring of repeated characters : <p>I have an assignment for school in which, given an input string of entirely 0's and 1's, I must return the length of the longest substring of repeated 1's. I am not allowed to use I am having trouble fleshing out my idea.
So far I have found the length of the input string and converted the input string to uint8. That way I can use find to find the indices of the ones. My next thought was to do some sort of for loop to store the indices, or maybe the check the length of each subset and only save the longest one? But I'm not sure how to go about this part or if this is even the right way to think about it. Any guidance is appreciated.</p>
