retr0coderxyz's blog

By retr0coderxyz, history, 5 years ago, In English

Hello Community,

I am trying to learn to find LCA using binary lifting method. But, I am unable to find where does my code fail. It would be great if someone could point this out.

Problem: LCA

Solution: Solution

Please Help me with this guys ! Please. Thank you!

  • Vote: I like it
  • -9
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it +3 Vote: I do not like it

One mistake which I noticed in line 118 you are using && instead of &

»
5 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Error in line 118 (not "&&", but "&"). And another error in the 194 line (not "t", but "i", since you print the test number)

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    It worked guys Thank you so much! Sorry for such a stupid mistake though :(