C Programming
The Difference Between
Artificial Intelligence

What is the difference between depth first and breadth first search in data structures?

User Avatar
Wiki User
2016-03-17 13:53:46

The main difference is that with depth first we use a stack to

backtrack and with breadth first we use a queue. Which method we

use is ultimately determined by the ordering of the tree.

Copyright © 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.