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