Time complexity of traditional (one-way) BFS is O(V+E) when an adjacency list is used. What is it in case of two-way BFS?
Based on the answer here, I know:
- BFS will traverse 1 + B + B^2 + ... + B^k vertices; whereas
- Bi-directional BFS will traverse 2 + 2B^2 + ... + 2B^(k/2) vertices.
But I don't know how to derive the time complexity based on this.