1 votes 1 votes Algorithms algorithms graph-algorithms breadth-first-search test-series + – thor asked Jan 15, 2017 retagged Jul 14, 2022 by makhdoom ghaya thor 301 views answer comment Share Follow See 1 comment See all 1 1 comment reply IamRishabh commented Jan 17, 2017 reply Follow Share i guess answer is " D" and for shortest path from i dont think so that BFS holds true btw what is different between statement A and B??? 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes Answer is 1 . A and B Only. BFS works fine for Weighted Graph to find Single Source shortest path from Source. So A and B are correct. C is false. DFS provides a precedence order if applied on DAG not BFS. Arnab Bhadra answered Jun 18, 2017 Arnab Bhadra comment Share Follow See 1 comment See all 1 1 comment reply codingo1234 commented Jul 31, 2018 reply Follow Share @Arnab Bhadra 1.(A) would have been true if the graph is "unweighted" 2.(B) it is true becoz it is a tree and in a tree we have only one path for every node, from source,so BFS works fine 3.(C) its obviously false so answer should be only (b) can you give an example to show how (A) is correct 0 votes 0 votes Please log in or register to add a comment.