vendredi 24 novembre 2017

Shortest simple cycle in C++

Given an undirected weighted graph. You are asked to find the shortest simple cycle. The definition of a simple cycle is as the following:

  1. The cycle must consist of at least 3 node

  2. No node in the cycle will be repeatedly visited

Time limit: 1.00s

It is known that there is at most 200 node and 19900 edges

Is there any other faster solution than dijkstra? A code in C++ can help a lot tks

Aucun commentaire:

Enregistrer un commentaire