Loading...
Is this your company?
When do we use BFS?
Anonymous
We use BFS to find the shortest path in an unweighted graph. It's useful when the graph is not too deep.
Bfs is done to find the shortest path in any graph. Also we can do bfs to find all possible paths. Bfs or dfs both can be used here.
Check out your Company Bowl for anonymous work chats.
Get actionable career advice tailored to you by joining more bowls.
Stay ahead in opportunities and insider tips by following your dream companies.
Get personalised job recommendations and updates by starting your searches.