Q. Which traversal method is more memory efficient for large graphs?
A.
BFS
B.
DFS
C.
Both are equally efficient
D.
Neither is efficient
Solution
DFS can be more memory efficient than BFS for large graphs, as it uses a stack (or recursion) and does not need to store all the vertices at the current level.