You are viewing a single comment's thread. Return to all comments →
c++
int birthdayCakeCandles(vector<int> candles) { vector<int>::iterator maks ; maks = max_element(candles.begin(),candles.end()); int result = 0; for (const auto& x : candles) { if (x == *maks) { result++; } }return result; }
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Birthday Cake Candles
You are viewing a single comment's thread. Return to all comments →
c++