Driver function
public static void main ( String [ ] args ) { int [ ] arr = { 0 , 4 , 2 , 5 , 2 , 1 } ; int [ ] jump = { 0 , 1 , 2 , 3 , 1 , 2 } ; int N = arr . length ; minJumps ( arr , jump , N - 1 ) ; } }