We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The Hurdle Race
The Hurdle Race
Sort by
recency
|
1441 Discussions
|
Please Login in order to post a comment
int result = Collections.max(height) - k; return result > 0 ? result : 0;
Solution in Java:
def hurdleRace(k, height): max1 = max(height) if max1-k < 0: return 0 else: return max1-k
Here is problem solution in python, Java, C++, C and Javascript - https://programmingoneonone.com/hackerrank-the-hurdle-race-problem-solution.html