I am not able to understand the sequence of code.
I am not able to understand the sequence of code.
Learning course: Arrays using Python
Problem Link: Rearrange Code Practice Problem in - CodeChef
I am not able to understand the sequence of code.
I am not able to understand the sequence of code.
Learning course: Arrays using Python
Problem Link: Rearrange Code Practice Problem in - CodeChef
@nainsidayal
this will be the correctly rearranged code
i = 0
one_streak = 0
while i < n:
temp = 0
while sequence[i] > 0:
temp = temp + 1
i = i + 1
if i == n:
break
if one_streak < temp:
one_streak = temp
i = i + 1