If the below graph is searched by both depth-first search and breadth-first search starting from D
Fantastic news! We've Found the answer you've been seeking!
Question:
If the below graph is searched by both depth-first search and breadth-first search starting from ‘D’, and if neighbors are searched in alphabetical order, what will be the order in which the nodes are visited?
a.) Using depth-first search
b.) Using breadth-first search
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date: