3 ms·
Wouldn't call it 'good' but it would be better than applying L on each row. Instead enumerate all unique permutations of the search term, calculate it's levens
by janee 7y ago
Wouldn't call it 'good' but it would be better than applying L on each row.
Instead enumerate all unique permutations of the search term, calculate it's levensten distance and then search through for a match...doing it one by one starting from distance 0 to max and returning the first match.
If the variable in complexity size is the number of rows then it's better to enumerate all permutations and do a single search over all rows, ordering results by distance and returning only the first match