dot 代码
digraph LinkedList {
rankdir=LR;
node [fontname="Arial", shape=record, style=filled, color="#ffffff", fillcolor="#0077be", fontsize=12, width=1.5, height=0.5];
edge [fontname="Arial", fontsize=10, color="#333333", arrowsize=0.5];
head [label="Head"];
tail [label="Tail"];
node1 [label="Node 1 | 5"];
node2 [label="Node 2 | 3"];
node3 [label="Node 3 | 8"];
node4 [label="Node 4 | 2"];
node5 [label="Node 5 | 9"];
head -> node1;
node1 -> node2;
node2 -> node3;
node3 -> node4;
node4 -> node5;
node5 -> tail;
}
效果