Tree: , , , . Five nodes. Root at . After DFS, subtree sizes: size[1]=5, size[2]=4, size[3]=1, size[4]=2, size[5]=1. Node has child with size[2]=4 > 5/2=2.5. Move to node . From , children are (size ), (size ), and (size ).
None exceed . The parent direction would have size , also under the threshold. Node is the centroid. Output: . The algorithm terminated in two steps, demonstrating the efficiency of walking toward heavy subtrees.