Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Birthday Cake Candles #67

Open
ndrohith09 opened this issue Oct 20, 2022 · 4 comments · Fixed by #117
Open

Birthday Cake Candles #67

ndrohith09 opened this issue Oct 20, 2022 · 4 comments · Fixed by #117
Assignees
Labels
easy question Further information is requested

Comments

@ndrohith09
Copy link
Member

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 units high. There are of them, so return .

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

Input Format

The first line contains a single integer, n, the size of candles[].
The second line contains space-separated integers, where each integer describes the height of .

Constraints

image

Sample Input 0

4
3 2 1 3

Sample Output 0

2

Explanation 0

Candle heights are [3,2,1,3]. The tallest candles are 3 units, and there are 2 of them.

@ndrohith09 ndrohith09 added question Further information is requested easy labels Oct 20, 2022
@aman-chhetri
Copy link
Contributor

I would like to do using Java.

aman-chhetri added a commit to aman-chhetri/hacktoberfest that referenced this issue Oct 20, 2022
mukesh663 added a commit that referenced this issue Oct 20, 2022
@IndexPosition
Copy link
Contributor

I would like to solve this problem using python.

IndexPosition added a commit to IndexPosition/hacktoberfest that referenced this issue Oct 20, 2022
To solve this issue we can get the maximum height from the list of candles and then count how many times that maximum height occurs in the list, which was possible using a for loop.
ndrohith09 added a commit that referenced this issue Oct 20, 2022
Create Birthday_Cake_Candles #67.py
@samarjeetvashistha
Copy link
Contributor

I want to solve it using c++

samarjeetvashistha added a commit to samarjeetvashistha/hacktoberfest that referenced this issue Oct 21, 2022
jaichiranjeeva added a commit to jaichiranjeeva/hacktoberfest that referenced this issue Oct 24, 2022
resolves cognizance-amrita#67 Birthday_Cake_candles question in the leftover lang C.
thekavikumar added a commit that referenced this issue Oct 25, 2022
@thekavikumar thekavikumar reopened this Oct 25, 2022
Simple-Saviour added a commit to Simple-Saviour/hacktoberfest that referenced this issue Oct 27, 2022
@mohan-warrior
Copy link
Contributor

I would like to solve this problem using ruby

mohan-warrior added a commit to mohan-warrior/hacktoberfest that referenced this issue Oct 30, 2022
thekavikumar added a commit that referenced this issue Oct 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
easy question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants