Sections


Main-Menu

header image

Breadth-First search


The Breadth-First search technique is exactly the same as the Depth-First except that the Breadth-First checks each node on a level until it proceeds to the next level. The example below demonstrates this technique with the goal of node ‘c’:

bfs.JPG

Advantages:
• Always finds the goal
• Good for shallow trees
Disadvantages:
• Often can be slow in deep trees
• Can result in an exhaustive search


Related Articles :



Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Shaadi.com Matrimony - Register for FREE