Search
⌘K

Leetcode 2385. Amount of Time for Binary Tree to Be Infected

Given a binary tree and a start node, compute how many minutes it takes for an infection that spreads each minute to adjacent nodes (parent/children) to reach every node. This reduces to treating the tree as an undirected graph and finding the maximum distance (time) from the start node, e.g., via BFS.

Asked at:

Microsoft

Microsoft


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Early December, 2025

Microsoft

Microsoft

Mid-level

Comments

Your account is free and you can post anonymously if you choose.