Calculating Minimum and Maximum Weight of node v till its 2 ^ i - th ancestor
minWei = Math . Min ( minWei , minWeight [ v , i ] ) ; maxWei = Math . Max ( maxWei , maxWeight [ v , i ] ) ; v = lca [ v , i ] ; } }