ACT 1: Ash Counting Trees

Ash Ketchum has a weird rooted tree (read Notes sections if you don’t know about tree data structure…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

I try to solve it, but stack for about 1 hours. I need to accepted python solution. if it not exits any other lang. accepted solution. Please, try to give it?