I want to know if there's other ways to solve the problem besides LCA
You do not need LCA to solve it.....
Mine algo does not use LCA, however it has time complexity O(V) for preprocessing and O(1) for querys. It is a lot easier than LCA...
If you want to know more, you can drop me a mail to:
oberon [at] verba [d0t] com [d0t] ua
Replace [at] by @, and [d0t] by .;
I have sent a reply for your mail.
Firstly I have sent it and it returned =(
Secondly I have sent it again and it was returned once again =((
The third time I have sent it from different addresse and It have not returned yet. I hope it will reach you soon...
If you won't recieve that email, drop a few words here (to the web-board) and we will think about different ways of communication =)...
Re: I have sent a reply for your mail.
Unfortunately,I must say that I didn't receive your E-mail
:'(
Did you have msn?
Thats really said :'(
I have tried once more...
I think moderators will forgive me for posting idea here:
-----------------
idea was here =)
-----------------
BTW. I do not have MSN... Let me know when you will read this, so I could clean up the forum...
Edited by author 25.02.2005 18:21
Re: Thats really said :'(
I've read it..I think it's a wonderful idea..You can clean it...Thank yor for your help.
Edited by author 25.02.2005 14:52
Re: Thats really said :'(
Where is edit button?
Re: Thats really said :'(
Could u tell me the method? I also want to know. Pls send to ahyangyi@gmail.com or ahyangyi2@hotmail.com, thank you
Re: Thats really said :'(
IMHO, the simplest way to solve it - skip lists. Simplest 2-level skip-lists gives time complexity for any query O(logN) and O(NlogN) for precalc. AC ~ 0.45 secs.