Returns largest possible sum of a Zizag sequence starting from top and ending at bottom .
static int largestZigZag ( int mat [ ] [ ] , int n ) { for ( int i = 0 ; i < MAX ; i ++ ) for ( int k = 0 ; k < MAX ; k ++ ) dp [ i ] [ k ] = - 1 ;