Birthday Cake Candles

  • + 0 comments
        int count = 0;
    int max = 0;
    for(int a: candles){
        if(a>max){
            max = a;
        }
    }
    for(int a: candles){
        if(a == max){
            count++;
        }
    }   
    return count;