Hackerrank - Jumping on the Clouds: Revisited

Hackerrank - Problem Statement

A description of the problem can be found on Hackerrank.

Solution

I jumped for k positions and lowered the energy. If I reached position 0 I printed the remaining enenergy.

I created solution in:

All solutions are also available on my GitHub.

Java

JavaScript

Scala

Ruby

Leave a Reply