Question: Graph Representations and Traversals (a) Write pseudo-code for an algorithm that performs depth-first search of a directed graph: G -(V, E) and prints out all
Graph Representations and Traversals

(a) Write pseudo-code for an algorithm that performs depth-first search of a directed graph: G -(V, E) and prints out all of the edges as they are checked. Note: an edge is checked when it is inspected by the algorithm (not necessarily traversed). 9 marks] (b) State the storage requirements of a graph with n nodes and m edges using: 1. an adjacency list, and 2. an adjacency matrix briefly justify each answer. [4 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
