You are viewing a single comment's thread. Return to all comments →
That way might be quicker than mine but I think mine looks nicer
function appleAndOrange(s, t, a, b, apple, orange) { return [ apple.map(p => p + a).filter(p => p >= s && p <= t).length, orange.map(p => p + b).filter(p => p >= s && p <= t).length ] }
Seems like cookies are disabled on this browser, please enable them to open this website
Apple and Orange
You are viewing a single comment's thread. Return to all comments →
That way might be quicker than mine but I think mine looks nicer