[LeetCode] Amount of Time for Binary Tree to Be Infected

1 · · Aug. 21, 2022, 6:32 a.m.
2385. Amount of Time for Binary Tree to Be Infected You are given the root of a binary tree with unique values, and an integer start. At minute 0, an infection starts from the node with value start. Each minute, a node becomes infected if: The node is currently uninfected. The node is adjacent to an infected node. Return the number of minutes needed for the entire tree to be infected. ...