public class Arbitrage extends Object
This implementation uses the Bellman-Ford algorithm to find a negative cycle in the complete digraph. The running time is proportional to V3 in the worst case, where V is the number of currencies.
For additional documentation, see Section 4.4 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
public static void main(String[] args)
Copyright © 2014. All Rights Reserved.