Loading topic
u", you need to decide what the subtree of u is. This chapter t8 min readroot_tree helper from the previous chapters. That helper returns parent, a pre-order order, and subtree size. In the reversed 8 min readroot_tree helper from the previous chapter. That helper roots the tree and returns a parent array, an order list in which every parent appears before its children, and the subtree sizes. Here we look cl7 min readroot_tree helper from earlier chapters. It is copi8 min readk entries. Some problems need more than that. Each subtree has to carry a whole collection, such as the set of colors that appear in it, or a map from value to how many t7 min read