You are viewing a single comment's thread. Return to all comments →
Two ruby solutions:
def birthdayCakeCandles(ar) height = 0 ar.each { |x| height = x if x > height } ar.select { |x| x == height }.count end
def birthdayCakeCandles(ar) ar.select { |x| x == ar.max }.count end
Seems like cookies are disabled on this browser, please enable them to open this website
Birthday Cake Candles
You are viewing a single comment's thread. Return to all comments →
Two ruby solutions: