euler_tour
Computes an Euler tour of a tree to generate tin/tout timestamps, node depths, and subtree sizes for ancestor and subtree queries.
Instructions
Compute Euler tour of a tree with tin/tout timestamps, depths, and subtree sizes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Root vertex (default 0) | |
| edges | Yes | Tree edges as [u, v] pairs (0-indexed) | |
| vertex_count | Yes | Number of vertices |