Please check my answer!!

nnugochi

New member
Joined
Nov 23, 2020
Messages
10
1A50C8C8-A0E3-4547-9265-E26180AEB5A6.jpeg
this is the question^

this is my answer:

9D8E21EA-52C1-465D-B1A8-704FFAA7FBD7.png
 

Attachments

  • 0C80739A-8439-4363-98A6-F7C3525E2661.png
    0C80739A-8439-4363-98A6-F7C3525E2661.png
    5.1 MB · Views: 0
I don't know what an adjacency list looks like, but in your arrow diagram, shouldn't D be joined to F rather than B?
 
I don't know what a Depth-First search is either, but your list is not in alphabetical order. Wouldn't it just be ABFGJKLM?
 
According to Wikipedia, "There are many variations of this basic idea"; but your adjacency list appears to be one of them, and perhaps done correctly.

Similarly, your depth-first search is valid depending on whether you have a rule for which direction to search first. You have not been consistent about that.
 
Top