Feb. 21, 2014, 4:22 p.m. by Rosalind Team
Topics: Graphs
Source: Algorithms by Dasgupta, Papadimitriou, Vazirani. McGraw-Hill. 2006.
Given: A simple graph with
Return: An array
See Figure 1 for visual example from the sample dataset.
5 4 1 2 2 3 4 3 2 4
3 5 5 5 0
Adjacency list data structure
An adjacency list data structure may come in useful.