Where are the edge lengths are positive and it has to run in O(V^3) time. I'm having a bit of trouble trying to wrap my head around this problem, but this is what I have right now:
Set a shortest cycle variable, make it really large. Loop through every vertex in the graph, then loop through every vertex in the graph for that for loop, then inside the double for loop, I compute the distance from the first vertex to the second, then the second to the first, then compare this distance with my shortest cycle variable and update if it is smaller.
With this implementation then, since I go through every vertex for every vertex in a double for loop it's O(V^3) but I use Djisktra's algorithm twice inside each iteration of the double for loop so that's O(ElogV). I'm not exactly sure how this would be O(V^3) so I think my implementation may need more work.