My issue
how to solve this
Learning course: Arrays using Java
Problem Link: Practice Problem in - CodeChef
how to solve this
Learning course: Arrays using Java
Problem Link: Practice Problem in - CodeChef
@prutha_0707
u have to do it like this
i = 0;
one_streak = 0;
int temp;
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;
}