10 Days of HackeRank's challenges -Day 7
I am a Web developer and a software engineering student of the Faculty of Engineering and Technology (FET) University of Buea. I am interested in innovative projects, open source and anything related to software development
Problem statement: Birthday Cake candles.
You are in charge of the cake for a child's birthday. You have decided the cake will have one candle for each year of their total age. They will only be able to blow out the tallest of the candles. Count how many candles are tallest.
Example
candles =[4,4,1,3]
The maximum height candles are 4 units high. There are 2 of them, so return 2.
Function Description
Complete the function birthdayCakeCandles in the editor below.
birthdayCakeCandles has the following parameter(s):
int candles[n]: the candle heights
Returns
int: the number of candles that are tallest.
Here is a link to my solution
https://github.com/Beri28/10-days-of-code/blob/main/daySeven.js
Here is a link to full question on HackeRank https://www.hackerrank.com/challenges/birthday-cake-candles/problem?isFullScreen=false