Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1443. Minimum Time to Collect All Apples in a Tree
Given a tree rooted at 0 with some nodes containing apples, find the minimum seconds (1 per edge traversal) to start at 0, collect all apples, and return to 0 — equivalently sum 2× each edge that lies on any path to an apple, which can be found by a post-order DFS that prunes subtrees without apples. (n up to 1e5.)
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late September, 2025
Meta
Mid-level
Late July, 2025
Meta
Senior
Early April, 2025
Meta
Mid-level
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.