Figure 2From: A practical O(n log2 n) time algorithm for computing the triplet distance on binary treesColoring when visiting a node. Coloring of a sub-tree rooted in node v lets us count all triplets rooted in v.Back to article page