memory leak fixed
merge conflict in bfs.cpp