Monil200 / CPrograms

temp for daily activities
1 stars 0 forks source link

All Ancestors of a node #11

Open Monil200 opened 10 years ago

Monil200 commented 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.