Efficient Algorithm for the Partitioning of Trees | Synapse