Sort by

recency

|

1441 Discussions

|

  • + 0 comments

    int result = Collections.max(height) - k; return result > 0 ? result : 0;

  • + 0 comments

    Solution in Java:

        int result = Collections.max(height) - k;
        return result > 0 ? result : 0; 
    
  • + 0 comments

    def hurdleRace(k, height): max1 = max(height) if max1-k < 0: return 0 else: return max1-k

  • + 0 comments
        int max = height.stream().max(Integer::compare).get();
        return max > k ? max-k : 0;
    
  • + 0 comments

    Here is problem solution in python, Java, C++, C and Javascript - https://programmingoneonone.com/hackerrank-the-hurdle-race-problem-solution.html