• + 0 comments
    scala
        def hurdleRace(k: Int, height: Array[Int]): Int = {
      height.foldLeft(0)({case (acc, n) => max(n-k, acc)})
    }