Open Monil200 opened 10 years ago
The comments help return the array length. So calling the main function 2 times will return different lengths..so lowest common ancestor 2 nodes can also be found. There is also a recursive way to find LCA.
The comments help return the array length. So calling the main function 2 times will return different lengths..so lowest common ancestor 2 nodes can also be found. There is also a recursive way to find LCA.