Answered You can hire a professional tutor to get the answer.

QUESTION

Write function returns the length of longest run of "1" in the string consumed (of 0s and 1s) a run of "1" is a sequence of adjacent "1" can not use

Write function returns the length of longest run of "1" in the string consumed (of 0s and 1s) a run of "1" is a sequence of adjacent "1"

can not use recursion

can not create new string /list

go through the string only once

Can not import modules except math

use python 3 or higher

For example

f1("001001")returns 1

f1("000000")returns 0

f3("10111000110")returns 3

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question