Question: QUESTION 5 What is the main difference between Breadth-First Search (BFS) and Depth-First Search (DFS)? O A. The kind of graphs they can handle: BFS

QUESTION 5 What is the main difference between Breadth-First Search (BFS) and Depth-First Search (DFS)? O A. The kind of graphs they can handle: BFS only exists for trees. O B. The order in which nodes are added to the search frontier: DFS uses a stack, BFS a queue. OC. The kind of graphs they can handle: DFS only exists for trees. O D. Their worst-case run time (O(n log n) vs. O(n^2))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
