MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / solve

Method solve

dynamic_programming/edit_distance.py:41–53  ·  view source on GitHub ↗
(self, A, B)

Source from the content-addressed store, hash-verified

39 return self.dp[x][y]
40
41 def solve(self, A, B):
42 if isinstance(A,bytes):
43 A = A.decode('ascii')
44
45 if isinstance(B,bytes):
46 B = B.decode('ascii')
47
48 self.A = str(A)
49 self.B = str(B)
50
51 self.__prepare__(len(A), len(B))
52
53 return self.__solveDP(len(A)-1, len(B)-1)
54
55if __name__ == '__main__':
56 try:

Callers 1

edit_distance.pyFile · 0.80

Calls 2

__prepare__Method · 0.95
__solveDPMethod · 0.95

Tested by

no test coverage detected