You are viewing a single comment's thread. Return to all comments →
public static int birthdayCakeCandles(List<Integer> candles) { int max = candles.stream().reduce(Integer::max).orElse(Integer.MIN_VALUE); return (int) candles.stream().filter(integer -> integer==max).count(); }
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 →