You are viewing a single comment's thread. Return to all comments →
Ruby:
a.reduce(0) do |sum,num| sum += 1 if num <= 0 sum end < k ? 'YES' : 'NO'
Seems like cookies are disabled on this browser, please enable them to open this website
Angry Professor
You are viewing a single comment's thread. Return to all comments →
Ruby:
a.reduce(0) do |sum,num| sum += 1 if num <= 0 sum end < k ? 'YES' : 'NO'