Блог пользователя kyrros

Автор kyrros, история, 4 года назад, По-английски

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!!

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится