Split Drainage Tree
Split Drainage Tree
A drainage tree has n nodes numbered from 0 to n - 1, with node 0 as the root.
You are given:
- an array
parent, whereparent[0] = -1andparent[i]is the paren...
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:
