-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: lowest common ancestor algorithms for trees #453
Comments
Definitely! We are also missing some cleanup and unification work (interface design, etc) regarding LCA algorithms. |
Great! I'll start working on that. Yes, I've seen that there is no |
HI |
@AlexandruValeanu We are slowly moving stuff into their respective packages. If you contribute more LCA algorithms, it would definitely make sense to have a separate Note that we use a strict 2 releases deprecation policy. We first deprecate a class in one release, and then remove it in the next. If you want to move a class, you deprecate the class and add a new class at the other location. After the next release, we will remove the deprecated class. |
Hi @d-michail. I'm interested to resolve that issue. I wanted to ask: what methods except findLca(V a, V b) and findAllLcas(V a, V b) should be presented in the LCA interface? About additional LCA algorithms: I want to implement Binary Lifting algorithm with O(nlogn) on preprocessing and O(logn) on query. Are you interested in it? Or it would be better to implement Farach-Bender first (because it's faster <O(n), O(1))? |
Hi Kirill,
I am writing to let you know that I have already started working on that idea and I'll soon be sending a comprehensive proposal to explain my ideas on that topic.
Best regards,
Alexandru Văleanu
On Tuesday, February 13, 2018, 5:55:33 PM GMT, Kirill Vishnyakov <notifications@github.com> wrote:
Hi @d-michail. I'm interested to resolve that issue. I wanted to ask: what methods except findLca(V a, V b) and findAllLcas(V a, V b) should be presented in the LCA interface?
About additional LCA algorithms: I want to implement Binary Lifting algorithm with O(nlogn) on preprocessing and O(logn) on query. Are you interested in it? Or it would be better to implement Farach-Bender first (because it's faster <O(n), O(1))?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I have noticed that Tarjan's algorithm is implemented but that is not very efficient if you run the queries one by one. There are some nice algorithms for solving the lca problem for trees that provide O(log n) or even O(1) per query.
I was thinking about implementing some and I was curious if this is something that would be interesting to have.
The text was updated successfully, but these errors were encountered: