Which of the following statements is true about DFS?
Practice Questions
1 question
Q1
Which of the following statements is true about DFS?
It can be implemented using a queue.
It is not suitable for finding shortest paths.
It always uses less memory than BFS.
It visits nodes in level order.
DFS is not suitable for finding shortest paths in unweighted graphs as it does not explore all neighbors at the current depth before going deeper.
Questions & Step-by-step Solutions
1 item
Q
Q: Which of the following statements is true about DFS?
Solution: DFS is not suitable for finding shortest paths in unweighted graphs as it does not explore all neighbors at the current depth before going deeper.