08_greedy_algorithms/python/01_set_covering.py
T-CHARE opened this issue · comments
......
for station, states in stations.items():
covered = (states_needed & states)
if len(covered) > len(states_covered):
best_station = station
states_covered = covered
......
should be like this:
......
for station, states in stations.items():
covered = (states_needed & states).union(states)
if len(covered) > len(states_covered):
best_station = station
states_covered = covered
......