You are viewing a single comment's thread. Return to all comments →
Ruby!
def birthday(bar, day, month) possible = 0 (0..bar.length - month).each do |i| possible += 1 if (bar[i...i + month].inject(0, :+) === day) end possible end
Seems like cookies are disabled on this browser, please enable them to open this website
Subarray Division
You are viewing a single comment's thread. Return to all comments →
Ruby!