You are viewing a single comment's thread. Return to all comments →
public static int birthdayCakeCandles(List<Integer> candles) { int maxNumber = Integer.MIN_VALUE; int can = 0; for(int i: candles){ if(i > maxNumber){ maxNumber = i; } } for(int j : candles){ if(j == maxNumber){ can++; } } return can; }
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 →