Store occurrence ofs characters of pattern
for ( var i = 0 ; i < len2 ; i ++ ) hash_pat [ pat . charAt ( i ) . charCodeAt ( 0 ) ] ++ ; var start = 0 , start_index = - 1 , min_len = Number . MAX_VALUE ;