Miltiadis Stouras

Results 15 comments of Miltiadis Stouras

Another example where it fails: ``` var g = new Graph(); g.setEdge(1, 2); g.setEdge(2, 3); g.setEdge(3, 4); g.setEdge(3, 1); g.setEdge(4, 1); g.setEdge(4, 5); g.setEdge(5, 3); alg.findCycles(g); // [ [ '5',...

Looking at the source code, the findCycles() implementation is the following: ``` function findCycles(g) { return _.filter(tarjan(g), function(cmpt) { return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0]));...

Thanks for the feedback @dionyziz @lutzroeder . Im working on the changes

@dionyziz @lutzroeder * I fixed the code format in all files * I changed the edge traversal as requested and added the relaxAllEdges() function in bellman-ford.js * I also corrected...

This pull request now fixes #87 . Summary: - Implemented the bellman-ford algorithm - Created `shortestPaths()` which in Θ(E) checks whether the graph contains a negative weight edge and chooses...

Hi @assafsun, I'll be glad to rebase this to master and squash the commits

Hi @assafsun, sorry for the delay, I rebased to master and squashed the fixup commits. Take a look whenever you have time :)

I refactored runExtractPath(), now it just iterates on predecessors and pushes them in the path array. When the iteration is finished, it reverses the array and returns it. Just for...

Yes, of course this result was expexted! - I couldnt find the `unshift` complexity from an official source with a quick search, so I just tested it on my own...