if patt [ i ] is found in ' um ' , check if it has the minimum index or not , accordingly update ' minIndex '
if ( hm . ContainsKey ( patt [ i ] ) && hm [ patt [ i ] ] < minIndex ) minIndex = hm [ patt [ i ] ] ;