Breadth-First Search: Difference between revisions
Jump to navigation
Jump to search
Created page with "The Breadth-First Search is an algorithm that finds if there is a path from one node to another. Unlike Depth-First Search, it looks for the neighbours node first before goin..." |
No edit summary |
||
| Line 1: | Line 1: | ||
The Breadth-First Search is an algorithm that finds if there is a path from one node to another. | The Breadth-First Search is an iterative algorithm that finds if there is a path from one node to another. | ||
Unlike Depth-First Search, it looks for the neighbours node first before going for the children. | Unlike Depth-First Search, it looks for the neighbours node first before going for the children. | ||
The algorithm uses queues to get the list of children of the node's neighbours to visit then is the correct order. | |||
Revision as of 06:12, 3 June 2018
The Breadth-First Search is an iterative algorithm that finds if there is a path from one node to another.
Unlike Depth-First Search, it looks for the neighbours node first before going for the children.
The algorithm uses queues to get the list of children of the node's neighbours to visit then is the correct order.