You are viewing a single comment's thread. Return to all comments →
int birthdayCakeCandles(vector<int> candles) { sort(candles.begin(), candles.end()); int blown = 1, biggest = candles[candles.size()-1]; candles.pop_back(); while (candles[candles.size()-1]==biggest) { blown++; candles.pop_back(); } return blown; }
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 →