Chapter 18: LCA method 1
Opened this issue · 0 comments
rosshjb commented
First of all, thank you for your work.
The code for LCA Method 1 appears to have a time complexity of
(The book says that method 1 has a time complexity of
Using dynamic programming, it seems like it should be possible to move up two or more steps when reaching the minimum common ancestor vertex.
Thanks.