So how should match the Levenshtein short edit Distance & lt; String=1?
In string "hereharewereworeherareteartoredeardareearrearehrerheasereseersearrah", for example, the matching mode "ware", will be
[5-7] : motorcycle, 19-21 [] : motorcycle, hare [4-7], [18 to 21] : rare, [34 to 37] : dare and so on, also can match the insertion of a character, such as "dware" this,
This problem should do excuse me?
CodePudding user response:
Wrote a version of the BF, complexity is O (m * n), but the title requires complexity O (n) on average, how can it doCodePudding user response:
Because m is far less than n I think lz make if time complexity is o (m * n), already meets the requirementsCodePudding user response: