Maximum Points After Collecting Coins From All Nodes at DE Shaw

Hard36.3% acceptance

This problem has 75.0% frequency at DE Shaw.

Problem Description

There exists an undirected tree rooted at node `0` with `n` nodes labeled from `0` to `n - 1`. You are given 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. You are also given a **0-indexed** array...

Read full problem and hints

Topics


More DE Shaw Questions

View all DE Shaw questions