Respuesta :

Yes, you can surely use stacks instead of a queue as the auxiliary data structure for the Breadth-First Search.

For every enqueue and dequeue operation, you might have to perform some extra pushing and popping which may lead to a complex code for a simple BFS.

What is Breadth-first search ?

BFS is an algorithm for looking for nodes in a tree data structure that satisfy a specified property. Before moving on to the nodes at the next depth level, it begins at the root of the tree and investigates every node there.

  • The breadth-first search method gets its name from the way it evenly widens the frontier between vertices that have been discovered and those that have not.

Learn more about Breadth first search here:

https://brainly.com/question/15142337

#SPJ4