Https://leetcode.com/problems/binary-tree-paths/
@anmolaggarwal.432 you can maintain a vector and do dfs call on the tree and pass the string in every recursive call and add the current character into the string and if the node is a leaf node just insert the string into the vector and then return the vector
if the problem is still unsolved let me know and if solved mark my experience
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.
I didnt get it please elaborate more like how you approach the question and also please explain it with the help of code
@anmolaggarwal.432
Coding Blocks IDE
this is the code as i said i will do a recursive call on left and right nodes an add this current value to a string and will pass this string in the recursion and if at any position i reach at leaf node then i will add this tring into my ans and that will do your work