Birthday Cake Candles

Sort by

recency

|

5366 Discussions

|

  • + 0 comments

    Mug printing offers a fun and creative way to celebrate special occasions like birthdays. Personalized mugs featuring birthday cake candles or festive designs make thoughtful gifts that brighten anyone’s day. These custom mugs combine practicality with celebration, allowing the recipient to enjoy their favorite drink while remembering the special moment. Perfect for parties or keepsakes, printed mugs add a unique touch that makes birthdays even more memorable and meaningful.

  • + 0 comments

    My solution in Javascript w Typescript

        const max: number = Math.max(...candles);
        const qty: number = candles.filter((c: number) => c == max).length || 0;
        return qty;
    
  • + 0 comments
    int birthdayCakeCandles(vector<int> candles) {
        sort(candles.begin(), candles.end());
        int blown = 1, biggest = candles[candles.size()-1];
        candles.pop_back();
        
        while (candles[candles.size()-1]==biggest) {
            blown++;
            candles.pop_back();
        }
        
        return blown; 
    }
    
  • + 0 comments

    *For C *

    int tallest = candles[0]; int count = 1;

    for (int i = 1; i < candles_count; i++) {
        if (candles[i] > tallest) {
            tallest = candles[i];
            count = 1;
        } else if (candles[i] == tallest) {
            count++;
        }
    }
    
    return count;
    
  • + 0 comments

    def birthdayCakeCandles(candles): # Write your code here tallest=max(candles) return candles.count(tallest)