function to calculate MIN path sum of 3D array
static int minPathSum ( int arr [ ] [ ] [ ] ) { int i , j , k ; int tSum [ ] [ ] [ ] = new int [ l ] [ m ] [ n ] ; tSum [ 0 ] [ 0 ] [ 0 ] = arr [ 0 ] [ 0 ] [ 0 ] ;