Q:

Traversal of a graph is different from tree because
(A) There can be a loop in graph so we must maintain a visited flag for every vertex
(B) DFS of a graph uses stack, but inorrder traversal of a tree is recursive
(C) BFS of a graph uses queue, but a time efficient BFS of a tree is recursive.
(D) All of the above

ALGORITHMS

All Replies

Viewing 1 replies (of 1 total)

Viewing 1 replies (of 1 total)

  • You must be logged in to reply to this topic.