Random Tree Generator
GraphsMediumGenerate random trees, binary trees, or weighted trees.
Alt+Ctrl+7
Constraints Config
Generated Output Preview
Configure constraints and generate output.
Complexity Specs
Time ComplexityO(N)
Space ComplexityO(N)
Generator Info & Limits
- Output lists N (number of nodes) followed by N-1 edges.
- Binary tree algorithm limits degree constraints (max 2 child links).
- Shuffle labels ensures random root positions (otherwise root is always node 1).