1.

Which data structure conveniently used to implement DFS?(a) Stacks(b) Queues(c) Priority Queues(d) All of the mentionedThe question was posed to me during an interview.This interesting question is from Uninformed Search and Exploration in chapter Problem Solving of Artificial Intelligence

Answer» CORRECT ANSWER is (a) Stacks

The EXPLANATION: DFS requires node to be expanded the one most recent VISITED, hence stack is convenient to implement.


Discussion

No Comment Found

Related InterviewSolutions