mirror of
https://github.com/onyx-and-iris/grokking-algorithms.git
synced 2024-11-15 17:30:52 +00:00
move fget out of greedy
This commit is contained in:
parent
e36f91c094
commit
a32d33876c
@ -12,16 +12,16 @@ stations = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def greedy():
|
def fget():
|
||||||
def fget():
|
needed = set()
|
||||||
needed = set()
|
for states in stations.values():
|
||||||
for states in stations.values():
|
needed |= states
|
||||||
needed |= states
|
return needed
|
||||||
return needed
|
|
||||||
|
|
||||||
|
|
||||||
|
def greedy():
|
||||||
states_needed = fget()
|
states_needed = fget()
|
||||||
logger.debug(states_needed)
|
logger.debug(states_needed)
|
||||||
|
|
||||||
final_stations = set()
|
final_stations = set()
|
||||||
|
|
||||||
while states_needed:
|
while states_needed:
|
||||||
|
Loading…
Reference in New Issue
Block a user