• + 0 comments

    Here is my c++ solution, you can watch the explanation here : https://youtu.be/HTbex2B-Yas

    int hurdleRace(int k, vector<int> height) {
        int mx = *max_element(height.begin(), height.end());
        return max(0, mx-k);
    }