0 votes
in Artificial Intelligence by
Which data structure conveniently used to implement DFS?

(a) Stacks

(b) Queues

(c) Priority Queues

(d) All of the mentioned

The question was posed to me during an interview.

This interesting question is from Uninformed Search and Exploration in chapter Problem Solving of Artificial Intelligence

Select the correct answer from above options

Interview Questions and Answers, Database Interview Questions and Answers for Freshers and Experience

1 Answer

0 votes
by
Correct answer is (a) Stacks

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

Related questions

0 votes
asked Oct 21, 2021 in Artificial Intelligence by DavidAnderson
0 votes
asked Dec 5, 2021 in Artificial Intelligence by DavidAnderson
...