You are viewing a single comment's thread. Return to all comments →
static int birthdayCakeCandles(int n, int[] ar) { int count=0; Arrays.sort(ar); int tallest = ar[n-1]; for(int i=0; i<n; i++) { if(ar[i] == tallest) count++; } return 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 →