菜单
×
×
正确!
练习Bellman-Ford 算法检查所有边的次数是多少? for i in range(self.size@(2)): for u in range(self.size): for v in range(self.size): if self.adj_matrix[u][v] != 0: if distances[u] + self.adj_matrix[u][v] < distances[v]: distances[v] = distances[u] + self.adj_matrix[u][v]
for i in range(self.size-1): for u in range(self.size): for v in range(self.size): if self.adj_matrix[u][v] != 0: if distances[u] + self.adj_matrix[u][v] < distances[v]: distances[v] = distances[u] + self.adj_matrix[u][v] 不正确点击这里重新尝试。 正确!下一题 ❯ |
这将重置所有 43 道练习的分数。
您确定要继续吗?