Then, for each internal node, N, compute the cost complexity of the subtree at N
C.
And also compute the cost complexity of the subtree at N if it were to be pruned
D.
At la st, compare the two values. If pruning the subtree at node N would result in a smaller cost complexity, the subtree is pruned. Otherwise, the subtree is kept