I'm working some programming exercises. This one has been quite well known and answered in different places.
FrogRiverOne Find the earliest time when a frog can jump to the other side of a river. https://codility.com/programmers/task/frog_river_one/
My question is, what if the Frog can jump a distance of D? how can we find the shortest time to cross the river, with the best runtime complexity? Thanks!
int solution(int X, vector<int> &A, int D); // frog can jumps from 1 to D steps
