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