function to calculate MIN path sum of 3D array
function minPathSum ( arr ) { var i , j , k ; var tSum = Array ( l ) ; for ( var i = 0 ; i < l ; i ++ ) { tSum [ i ] = Array . from ( Array ( m ) , ( ) => Array ( n ) ) ; } tSum [ 0 ] [ 0 ] [ 0 ] = arr [ 0 ] [ 0 ] [ 0 ] ;