Bidirectional search example
Dorian asked for implementation of bidirectional search algorithm. So I created very simple implementation of bidirectional search, not optimized at all. But I hope this is enough to understand the algorithm.
>>> from bidirectionalsearch import *
>>> bidirectional_search(graph,1,3)
[1, 2, 3]
>>> bidirectional_search(graph,1,8)
[1, 2, 3, 4, 7, 8]
>>> bidirectional_search(graph,1,9)
[]
>>> bidirectional_search(graph,1,11)
[]
5 comments:
link is broken
Sorry, like always we had problems with server. Should work now.
still broke
The link seems to be broken
The link seems to be broken
Post a Comment