Driver program to test above function
int main ( ) { int arr [ ] = { 0 , 0 , 0 , 1 , 1 , 0 , 1 , 0 , 0 , 0 , 0 } ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; cout << minJumps ( arr , n ) ; return 0 ; }