This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import defaultdict | |
| import random | |
| class Graph: | |
| def __init__(self, vertici): | |
| self.V = vertici | |
| self.graph = defaultdict(list) | |
| def addEdge(self, u, v): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pickle | |
| class Edit_distance_manager: | |
| def __init__(self): | |
| self.matrix = [] | |
| self.op = [] | |
| self.cost = [0, 1, 1, 1, 1] # copy, replace, twiddle, insert, delete | |
| def _setcost(self, op_cost): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pickle | |
| class Edit_distance_manager: | |
| def __init__(self): | |
| self.matrix = [] | |
| self.op = [] | |
| self.cost = [0, 1, 1, 1, 1] # copy, replace, twiddle, insert, delete | |
| def _setcost(self, op_cost): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pickle | |
| class Edit_distance_manager: | |
| def __init__(self): | |
| self.matrix = [] | |
| self.op = [] | |
| self.cost = [0, 1, 1, 1, 1] # copy, replace, twiddle, insert, delete | |
| def _setcost(self, op_cost): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pickle | |
| class Edit_distance_manager: | |
| def __init__(self): | |
| self.matrix = [] | |
| self.op = [] | |
| self.cost = [0, 1, 1, 1, 1] # copy, replace, twiddle, insert, delete | |
| def _setcost(self, op_cost): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a | |
| abbandonare | |
| abbastanza | |
| abitare | |
| abito | |
| accadere | |
| accanto | |
| accendere | |
| accettare | |
| accogliere |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pickle | |
| class Edit_distance_manager: | |
| def __init__(self): | |
| self.matrix = [] | |
| self.op = [] | |
| self.cost = [0, 1, 1, 1, 1] # copy, replace, twiddle, insert, delete | |
| def _setcost(self, op_cost): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pickle | |
| class Edit_distance_manager: | |
| def __init__(self): | |
| self.matrix = [] | |
| self.op = [] | |
| self.cost = [0, 1, 1, 1, 1] # copy, replace, twiddle, insert, delete | |
| def _setcost(self, op_cost): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pickle | |
| class Edit_distance_manager: | |
| def __init__(self): | |
| self.matrix = [] | |
| self.op = [] | |
| self.cost = [0, 1, 1, 1, 1] # copy, replace, twiddle, insert, delete | |
| def _setcost(self, op_cost): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pickle | |
| class Edit_distance_manager: | |
| def __init__(self): | |
| self.matrix = [] | |
| self.op = [] | |
| self.cost = [0, 1, 1, 1, 1] # copy, replace, twiddle, insert, delete | |
| def _setcost(self, op_cost): |
NewerOlder