PHP bidirectional algorithm to find connection between linked users

This is the version (2.0) of our earlier post Find connection path between two users in a social network using PHP and http://blog.kunals.com/php-code-find-2-users-connected-friends-social-network/. In this version bidirectional search is performed from both ends/nodes/users and if found path is displayed. This is based on graph traversal, breadth first search (bfs), bi-directional bfs. Nodes are the users and … Read more