It is a list of nodes and edges represented by some sort of key-value pair, where the value is an array of edges.
const adjacencyList = {
A: ['B', 'C'],
B: ['A', 'D'],
C: ['A', 'D'],
D: ['B', 'C'],
}; It is a list of nodes and edges represented by some sort of key-value pair, where the value is an array of edges.
const adjacencyList = {
A: ['B', 'C'],
B: ['A', 'D'],
C: ['A', 'D'],
D: ['B', 'C'],
};