diff --git a/HackerRank-Birthday Cake Candles/Birthday_Cake_Candles.py b/HackerRank-Birthday Cake Candles/Birthday_Cake_Candles.py index bff6827..a7e8f1a 100644 --- a/HackerRank-Birthday Cake Candles/Birthday_Cake_Candles.py +++ b/HackerRank-Birthday Cake Candles/Birthday_Cake_Candles.py @@ -8,12 +8,8 @@ # Complete the birthdayCakeCandles function below. def birthdayCakeCandles(ar): - count=0 big = max(ar) - for i in range(len(ar)): - if(ar[i]==big): - count+=1 - return count + return ar.count(big) if __name__ == '__main__':