Https://leetcode.com/problems/sum-root-to-leaf-numbers/
https://ide.codingblocks.com/s/588986 u can refer this solution. if u still have any doubts msg back here
I just want to know the approach i dont want a solution sir
ok so all u can do is traverse over the tree and store all paths from root to leaf nodes in a vector. when u reach leaf node u have all the nodes u travelled from root to this leaf. so u can find out the integer from the numbers u got on this route. similarly u do for all paths and add it together to get final ans. u can once go through the solution for better insight. if u still have any doubts u can ask
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.