You are given a binary tree. Find all paths from root to leaves of the binary tree.
The only argument given is the root pointer of tree A.
Return all paths from root to leaf.
1 <= number of nodes <= 50000 0 <= A[i] <= 10^9
Input 1: 5 / \ 4 8 / / \ 11 13 4 / / 7 5 Output 1: [ [5,4,11,7], [5,8,13], [5,8,4,5] ]
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.