You are viewing a single comment's thread. Return to all comments →
int birthdayCakeCandles(vector<int> candles) { unordered_map<int, int> hMap; int max = -1; for(int i = 0; i < candles.size(); i++) { if(candles[i] > max) max = candles[i]; hMap[candles[i]]++; } return hMap[max]; }
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 →