Prufer Code Decoder

Generate a tree from a given Prufer code and visualize the graph.

Extra information about Prufer codes: Wikipedia.

Enter the Prufer code as a comma-separated list (e.g., 4,4,4,5).

Result: