We have one candle of height 1, one candle of height 2, and two candles of height 3. Your niece only blows out the tallest candles, meaning the candles where height = 3. Because there are 2 such candles, we print 2 on a new line.
How to find HackerRank solution for birthday cake candles?
Below is the example after that we are going to find the Birthday Cake Candles Hackerrank Solution in C. For example, if your niece is turning 4 years old, and the cake will have 4 candles of height 4, 4, 1, 3, she will be able to blow out candles successfully 2 since the tallest candles are of height 4 and there are 2 such candles.
How many candles do you put on your cake?
The cake fashion now in my country is to put candles shaped like numbers. If you are celebrating your golden year, then you put 50 on the cake. But ain’t it all the more fun if we light up 50 tiny candles?
Why do we put candles on our birthday cake?
As for why we put candles on our cake and then insist on blowing them out while making a wish, well, there a numerous pieces of history that helped give birth to this tradition. This celebratory practice wasn’t cooked up by the marketing execs at Betty Crocker or even the candle industry.
How many candles are in a birthday cake?
You are in charge of the cake for your niece’s birthday and have decided the cake will have one candle for each year of her total age. When she blows out the candles, she’ll only be able to blow out the tallest ones.
Below is the example after that we are going to find the Birthday Cake Candles Hackerrank Solution in C. For example, if your niece is turning 4 years old, and the cake will have 4 candles of height 4, 4, 1, 3, she will be able to blow out candles successfully 2 since the tallest candles are of height 4 and there are 2 such candles.
Who is in charge of the birthday cake?
You are in charge of the cake for your niece’s birthday and have decided the cake will have one candle for each year of her total age. When she blows out the candles, she’ll only be able to blow out the tallest ones. Your task is to find out how many candles she can successfully blow out.
Why do we blow out candles on birthday cake?
Just about everybody loves being presented with a birthday cake, and blowing out the candles before digging into the sweet treat is a tradition that carries on from childhood into adulthood.