You are viewing a single comment's thread. Return to all comments →
java solution i made ..
int max = Integer.MIN_VALUE; for(int i = 0 ;i<candles.size();i++){ if(max<candles.get(i)){ max = candles.get(i); i=0; } if(max>candles.get(i)){ candles.remove(i); i=0; } } return candles.size(); }
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Birthday Cake Candles
You are viewing a single comment's thread. Return to all comments →
java solution i made ..