AlgoMaster Logo

Minimum Height Trees

n=6,edges=[[3,0],[3,1],[3,2],[3,4],[5,4]]
0 / 14
012345Leaves:Degree:101112432415MHT Roots:Legend:DefaultLeafProcessingMHT RootRemoved
algomaster.io
Step:Initialize degree array: [1, 1, 1, 4, 2, 1]