in problem root tree direct graph exactly node root node descendant node plus node exactly parent root node parentsThe give input direct graph start root tree n node distinct value 1 n additional direct edge add the add edge different vertex choose 1 n edge existedthe result graph give 2darray edge each element edge pair ui vi represent direct edge connect node ui vi ui parent child viReturn edge remove result graph root tree n node if multiple answer return answer occur give 2darray Example 1input edge 121323output 23example 2input edge 1223344115output 41 Constraintsn edgeslength3 n 1000edgesilength 21 ui vi nui vi