Collect Coins
A player has to collect coins from various locations. The city is represented as a tree with n vertices labelled from 0 to n-1. There is an array called coins of size n where coins[i] is e...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
