Adding modifications for BFS
Final accepted version of BFS

Time 1.36 secs