Driver code
static void Main ( ) { string str1 = " voldemort " ; string str2 = " dumbledore " ; int n = str1 . Length , m = str2 . Length ; List < List < int > > dp = new List < List < int > > ( ) ; for ( int i = 0 ; i < n + 1 ; i ++ ) { dp . Add ( new List < int > ( ) ) ; for ( int j = 0 ; j < m + 1 ; j ++ ) { dp [ i ] . Add ( - 1 ) ; } } Console . WriteLine ( minDis ( str1 , str2 , n , m , dp ) ) ; } }