bfs for directinal graph
changed
changed