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