Traverse through all the points reachable from arr [ l ] Recursively , get the minimum number of jumps needed to reach arr [ h ] from these reachable points
int res = INT_MAX ; for ( int i = n - 2 ; i >= 0 ; i -- ) { if ( i + arr [ i ] >= n - 1 ) { int sub_res = minJumps ( arr , i + 1 ) ; if ( sub_res != INT_MAX ) res = min ( res , sub_res + 1 ) ; } } return res ; }