Current characters are considered as matching in two cases ( a ) current character of pattern is ' ? ' ( b ) characters actually match
else if ( pattern [ j - 1 ] == ' ? ' str [ i - 1 ] == pattern [ j - 1 ] ) lookup [ i ] [ j ] = lookup [ i - 1 ] [ j - 1 ] ;