You are viewing a single comment's thread. Return to all comments →
while (i>-1&&a[i--] == tallest) { count++; }
You just forgot to check whether the index i is within the bounds.
Seems like cookies are disabled on this browser, please enable them to open this website
Birthday Cake Candles
You are viewing a single comment's thread. Return to all comments →
while (i>-1&&a[i--] == tallest) { count++; }
You just forgot to check whether the index i is within the bounds.