Question

Question 6 20 pts Consider the following graph: 0 E (F Starting from the green node at the top, marked with the letter A, whi

0 0
Add a comment Improve this question Transcribed image text
Answer #1

BFS(Breadth First Search) Algorithm will find the yellow node first than the DFS(Depth First Search) Algorithm. As the name suggest BFS works by visiting all the nodes at a particular level first. For example: BFS will visit the nodes in order A,B,C,D,E,F,G...... and so on. But in case of DFS it will first visit all the nodes in left and then in right. For Example: DFS will visit the nodes in order A,B,D,H,L,I,E,J,M,C,F,G,K.....

So in BFS before F it visited 5 nodes whereas in DFS it visited 10 nodes.

Add a comment
Know the answer?
Add Answer to:
Question 6 20 pts Consider the following graph: 0 E (F Starting from the green node...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT