Birthday Cake Candles

Sort by

recency

|

5381 Discussions

|

  • + 0 comments

    public static int birthdayCakeCandles(List candles) { // Write your code here candles.sort((a,b)->b-a); Integer i=candles.get(0); return Collections.frequency(candles, i);

            }   
    
  • + 0 comments

    I like how birthday cake candles instantly make any celebration feel special. I recently helped decorate a family cake with simple candles and a warm blessing, it made the moment more meaningful. Adding Short Marathi Birthday Lines beside the cake can blend tradition with joy beautifully.

  • + 0 comments

    public static int birthdayCakeCandles(List candles) {

    Collections.sort(candles,Collections.reverseOrder());
    int before=candles.size();
    
    candles.removeAll(Collections.singleton(candles.get(0)));
    
    
    return before-candles.size();
    
    }
    

    }

  • + 0 comments

    def birthdayCakeCandles(candles): return candles.count(max(candles))

  • + 0 comments

    For Python3 Platform

    def birthdayCakeCandles(candles):
        return candles.count(max(candles))
    
    n = int(input())
    candles = list(map(int, input().split()))
    
    result = birthdayCakeCandles(candles)
    
    print(result)