Nobody says they have no limitations. The question is are those limitation fundamental, i.e. can we expect improvement, say within a year.
def visit_bf(g):
n, children = g
yield n
if children:
iterators = [iter(visit_df(c)) for c in children]
while iterators:
try:
yield next(iterators[0])
except StopIteration:
iterators.pop(0)
iterators = iterators[1:] + iterators[:1]
The difference between DFS and BFS is literally just the last line that rotates the list of child trees. (d==0.?K*.01*h:c-c)
could become (d>0.?.0:.01)*K*h