Leetcode 2603. Collect Coins in a Tree
Given a tree where you can collect all coins within distance 2 of your current node and may move along edges, find the minimum number of edge-traversals needed to collect all coins and return to your start. The challenge is to trim irrelevant subtrees and compute the minimal round-trip traversal of the remaining core tree (typically solved by iterative leaf-pruning and a tree-diameter-style reduction).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.