From 94d9dba6156caa1eba7c0a2b8aec1e1a17d32c34 Mon Sep 17 00:00:00 2001 From: wakidurrahman Date: Wed, 7 Jun 2023 12:57:58 +0900 Subject: [PATCH] feat: updated --- .../problem-solving/algorithms-004-010.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/hackerrank/problem-solving/algorithms-004-010.js b/src/hackerrank/problem-solving/algorithms-004-010.js index 32ed809..1b56edb 100644 --- a/src/hackerrank/problem-solving/algorithms-004-010.js +++ b/src/hackerrank/problem-solving/algorithms-004-010.js @@ -129,6 +129,7 @@ function staircase(n) { staircase(6); /** + * 008 * Given five positive integers, * find the minimum and maximum values that can be calculated by summing exactly four of the five integers. * Then print the respective minimum and maximum values as a single line of two space-separated long integers. @@ -165,3 +166,19 @@ function miniMaxSum(arr) { const miniMaxSumArray = [1, 2, 3, 7, 5, 9]; miniMaxSum(miniMaxSumArray); + +/** + * 008 + * 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. + * + * Complete the 'birthdayCakeCandles' function below. + * The function is expected to return an INTEGER. + * The function accepts INTEGER_ARRAY candles as parameter. + */ + +function birthdayCakeCandles(candles) { + // Write your code here +}