Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
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.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.