kyrros's blog

By kyrros, history, 3 years ago, In English

This problem falls under the LCA category in Csacademy's tasks list.
How to apply LCA when given graph may not be a tree?

Problem

As I've understood it, to answer a given query of two vertices namely A and B, we have to find the number vertices which are present in all the paths from vertex A to vertex B.

Links to similar problems would be appreciated. Thanks!!

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it