Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Depth First Search

Write a program in C++/Java that performs a DFS on following graph and ouputs edges with labels, tree edge, back edge, forward edge and cross edge.Submit your program and screen shot of outputs in a single word/pdf file.

Your program should accept following file as an input. You have to write code to process this input. You should define and use adjacency list representation of graph.

The input in the file is in this format:

First line is number of nodes.

Rest of lines are in this format: node number (node degree) : adjacency list

Show more
Files: input.txt
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question