Company: virtusa_17oct
Difficulty: medium
Equal Biomass Partition Problem Description Emma is studying a model of ecological biomass distribution in a forest ecosystem. The forest is modelled as a tree with N habitat blocks, where each block contains a certain amount of biomass (integer value). The blocks are connected by paths, forming a tree (i.e. a connected, acyclic graph). Emma wants to cut exactly one path so that the resulting tree has two parts with equal total biomass. Your task is to determine which path can be removed to achieve this equal partitioning. If there are multiple such paths, you should identify a valid cut (if it exists). In case there is more than one path that can be cut to achieve the equal partitioning, return the smallest pair lexicographically. If no such path exists, return [-1, -1]. Input Specification input1: An integer value N, representing the number of blocks. input2: A 1D array of size N, representing biomass value of each block. input3: A 2D array of size (N - 1) x 2, where each row represe