Well, imagine you have a tree. You know that he has one sheet with the data you want. Suppose you want to find this leaf by traveling through the various branches of a tree until you find it.
With Depth First search , if you come across a branch, you should take this branch and then take another branch, another and another, until you get to the leaf.
With a quick first search (note, I didnβt say 'better first' here), when you come across a new branch, you add it to the queue to return to it later until you find all the branches at the current level. Usually, when people say βBFS,β they mean Width First Search , not Best First.
Best , ? , , , . DFS , , .
, , , . , - type Depth.
, .