DP [ i ] will be storing the minimum number of jumps required for the position i . So DP [ N + 1 ] will have the result we consider 0 as source and N + 1 as the destination
DP = [ 0 for i in range ( N + 2 ) ] NEW_LINE