Open Kennedylelei opened 6 months ago
private class Node { private String label;
public Node(String label) {
this.label = label;
}
@Override
public String toString(){
return label;
}
}
This is the Node class, used to define label and its constructor and an Override of the toString() method that returns the name of the label.
The Implementation seems to use two HashMaps, one with string and nodes, possibly the "Nodes" themselves. While the other , a Node and a list of other nodes, this is most likely the Linked List.
private Map<String, Node> nodes = new HashMap<>();
private Map<Node, List
public class Graphs{