Root to leaf 2 (path sum 2)

giving wrong ans in all the test cases on hackerblocks but accepted on leetcode… tell me whats wrong in this …

Hey @amaaanahmedkhan987 can you share the problem link of leetcode so that I can verify?

Moreover share the link for hacker blocks too

https://online.codingblocks.com/app/player/117828/content/101550/8474/code-challenge

This link isn’t showing any problem statement, though I have checked your code and it works fine. It might be failing hackerblocks test cases because of the output format. Take that into consideration rest your code works fine :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.