Exercise 1:
Write a java implementation for the adjacency list representation of graphs, as described in the
lecture. Your code should be in a single class that implements the following interface:
public interface Graph {
Graph(int n, String[] labels);
void addEdge(String a, String b, int weight);
void removeEdge(String a, String b);
List<String> getAdjacentNode(String a);
}
Exercise 2:
Implement Depth-First Search and Breadth-First Search on the graph class of exercise 1. Both
methods should be private static of this same class.