fast string matching algorithm with k differences