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

Автор Aritra741, история, 6 лет назад, По-английски

I recently came across a problem in SPOJ that asks the minimum length of the cycles starting at each node of the graph. For details: Link .

I solved it by considering each node as the root and found the minimum length cycle with BFS. You can find my code Here .

Now I'm wondering how it could be solved if there were 10^5 nodes instead of 2000. Any kind of help is appreciated.

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

»
6 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Aritra741 (previous revision, new revision, compare).