You are viewing a single comment's thread. Return to all comments →
C++ Solution
int birthdayCakeCandles(vector candles) {
auto max = max_element(candles.begin(), candles.end()); auto iter{ std::remove_if(candles.begin(), candles.end(), [&max](int i){ return i != *max; }) }; candles.erase(iter, candles.end()); return candles.size();
}
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 →
C++ Solution
int birthdayCakeCandles(vector candles) {
}