bfs_search function for digraphs added.