Tree: node (color ) has children (color ) and (color ). Node has child (color ). Process : map = {:}, max = , sum = . Process : take map from . Add color . Map = {:, :}, max = , sum = + = .
Process : map = {:}, max = , sum = . Process : take map from child (size ). Merge {:} from child . Add color . Map = {:, :, :}. Max = , sum = (only color has frequency ).