Total score of leaf domains.
Unlock detailed company stats for this questionUpgrade
Given a list of domain names with scores, output each leaf domain with its total score, which is the sum of its own and all its ancestor domains' scores. A domain is a leaf if no other input domain is its child. For example, www.test.com with ancestors com (20), test.com (-10) and itself (-5) gives 5.
Community answers
No answers contributed by the community yet.
Related courses

Course

Course
Course
