A directed graph is given and you have to output one of the odd cycles

Правка en2, от kittyK, 2020-07-27 13:10:52

Given a graph with n nodes and m edges . n ≤ 100,000 and m ≤ 1,000,000 . We have to find any odd cycle.

Question Link

How to solve this problem ? I tried in naive way. I just stored the nodes when I get any cycle of odd length . But it will obviously TLE.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский kittyK 2020-07-27 13:10:52 18
en1 Английский kittyK 2020-07-27 13:10:07 445 Initial revision (published)