You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think in this part of code
else{
// note: need to minus "1"
// because the rightEnd is not included
numTriangle = numTriangle + (rightEnd - leftEnd - 1);
leftEnd++; // decrease the Caterpillar
}
after leftEnd++ a line is missing:
something like: if (leftEnd==rightEnd) rightEnd++
The text was updated successfully, but these errors were encountered:
I think in this part of code
else{
// note: need to minus "1"
// because the rightEnd is not included
numTriangle = numTriangle + (rightEnd - leftEnd - 1);
leftEnd++; // decrease the Caterpillar
}
after leftEnd++ a line is missing:
something like: if (leftEnd==rightEnd) rightEnd++
The text was updated successfully, but these errors were encountered: