Function to find weight of LCS
static int lcs ( int [ , ] dp , String a , String b , int m , int n ) { for ( int i = 0 ; i < 100 ; i ++ ) for ( int j = 0 ; j < 100 ; j ++ ) dp [ i , j ] = - 1 ; if ( m < 0 n < 0 ) { return 0 ; }