Codility Frog River Jump Problem

frog-jump

Test Result: https://codility.com/demo/results/demoXA9DPU-8J4/

I wish I had the time to write more about the problem and explain how I arrived at the solution, If you need help or have questions about the solution, just comment and ask.