Hi,
I got 3 questions for Arcesisum Online Assessment. Out of which I solved only 1.
Maximum Product Subsets : eg : [3,7], ans = 147 = 3x7x7 => {3}, {7}, {3,7} subsets. take max from each and multiply.

Can someone help me with the approach for 2nd problem?
Related to trees (Stream Distribution, Haven't got the time to read the 3rd question)