Java Frog Jmp
public class Solution {
public static long frogJmp(int x, int y, int d) {
return (long) Math.ceil(((double) y - x) / d);
}
}
This computes the jump count with math instead of simulation, which is the cleanest way to solve it.