Difference Between Maximum and Minimum Price Sum at Media.net

Hard33.2% acceptance

This problem has 100.0% frequency at Media.net.

Problem Description

There exists an undirected and initially unrooted tree with `n` nodes indexed from `0` to `n - 1`. You are given the integer `n` and a 2D integer array `edges` of length `n - 1`, where `edges[i] = [ai, bi]` indicates that there is an edge between nodes `ai` and `bi` in the tree. Each node has an as...

Read full problem and hints

Topics

Also asked at 1 company


More Media.net Questions

View all Media.net questions