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