r/computerscience • • Apr 21 '25
Help Doubt in Dsa
Guys, while traversing a directed graph using BFS or DFS, some nodes may not be reachable. What should we do in that case? Is it okay to leave ?
28
Upvotes


View all comments
Show parent comment
1
u/kiner_shah Apr 22 '25
Yes, they can be ignored, if you start your search from A, they can't be reached.