• + 0 comments

    JS, Javascriipt solution:-

    function hurdleRace(k, height) {
        const heighestHurdel = Math.max(...height);
        const doseNeeded = heighestHurdel - k;
        return doseNeeded > 0?doseNeeded:0;
    }