Consider the digraph shown in Figure 1. Assume the adjacency lists is sorted in alphabetical order of vertex. 1) Represent the given graph using adjacency matrix and adjacency list. 2) Show depth-first search traversal on the digraph, starting from vertex A.
Answers
Answered by
3
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.
In case you wish to attend live classes with experts, please refer DSA Live Classes for Working Professionals and Competitive Programming Live for Students.
Input: n = 4, e = 6
0 -> 1, 0 -> 2, 1 -> 2, 2 -> 0, 2 -> 3, 3 -> 3
Output: DFS from vertex 1 : 1 2 0 3
was this answer helpful?
add this as brainly list please
Similar questions