This is a solution for the Codility Frog Jump challenge.