Largest Tree in a Forest

Problem: Largest Tree in a Forest

You are given a dictionary/mapping child -> parent, representing parent-child relationships in a forest. Find the root node ID of the tree with the largest numb...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: