You are viewing a single comment's thread. Return to all comments →
My JS solution:
function countApplesAndOranges(s, t, a, b, apples, oranges) { console.log( apples .map(apple => apple + a) .filter(apple => apple >= s && t >= apple).length ); console.log( oranges .map(orange => b + orange) .filter(orange => orange <= t && orange >= s).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 →
My JS solution: