Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
The company can be represented as a tree, headID is always the root.
Store for each node the time needed to be informed of the news.
Answer is the max time a leaf node needs to be informed.