Levenstein distance limit
问题 If I have some distance which I do not want to exceed. Example = 2. Do I can break from algoritm before its complete completion knowing the minimum allowable distance? Perhaps there are similar algorithms in which it can be done. It is necessary for me to reduce the time of work programs. 回答1: If you do top-down dynamic programming/recursion + memoization, you could pass the current size as an extra parameter and return early if it exceeds 2. But I think this will be inefficient because you