Hackerrank – The Hurdle Race

Hackerrank – Problem Statement

A description of the problem can be found on Hackerrank.

Solution

We need to find the highest hurdle. If it is greater than k then substract its height with k and we have the result. Otherwise print 0.

I created solution in:

All solutions are also available on my GitHub profile.

Scala

Java

Javascript

Ruby

Leave a Reply

Your email address will not be published. Required fields are marked *