a tree undirecte graph vertex connect exactly path in word connect graph simple cycle treeGiven tree n node label 0 n 1 array n 1 edge edgesi ai bi indicate undirected edge node ai bi tree choose node tree root when select node x root result tree height h among possible rooted tree minimum height ie minh call minimum height tree mhtsreturn list MHTs root label you return answer orderThe height root tree number edge long downward path root leaf Example 1input n 4 edge 101213output 1explanation as show height tree 1 root node label 1 MHTExample 2input n 6 edge 3031323454output 34 Constraints1 n 2 104edgeslength n 10 ai bi nai biAll pair ai bi distinctThe give input guarantee tree repeat edge