Driver program to test above functions
int main ( ) { int grid [ ROW ] [ COL ] = { { 1 , 0 , 1 , 0 , 1 } , { 0 , 1 , 0 , 0 , 0 } , { 0 , 1 , 1 , 0 , 0 } } ; cout << minTotalDistance ( grid ) ; return 0 ; }