You are viewing a single comment's thread. Return to all comments →
Can be done it like this.
int max = 0, count = 1; for (int v : ar) { if (v == max) count++; if (v > max) max = v; } return count;
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 →
Can be done it like this.