You are viewing a single comment's thread. Return to all comments →
Javascript solution:
function getMoneySpent(keyboards, drives, b) { return keyboards.reduce((acc, curr) => Math.max(acc, ...drives.map(usb => usb + curr).filter(ku => b >= ku)) , -1); }
Seems like cookies are disabled on this browser, please enable them to open this website
Electronics Shop
You are viewing a single comment's thread. Return to all comments →
Javascript solution: