You are viewing a single comment's thread. Return to all comments →
function hurdleRace(k, height) { var highest_hurdle = -Infinity var difference for (var i = 0; i < height.length ;i++) { if (highest_hurdle < height[i]){ highest_hurdle = height[i] } } difference = highest_hurdle - k console.log(`Difference : ${difference}`) if (difference <= 0) return 0 else return difference }
Seems like cookies are disabled on this browser, please enable them to open this website
The Hurdle Race
You are viewing a single comment's thread. Return to all comments →