All Questions
2 questions
2
votes
0
answers
124
views
Iterating over all simple unique cycles in an undirected graph in Java - brute-force approach
This post is about an Iterator iterating over simple loops of an undirected graph.
In the above graph, the cycle \$\langle 1, 2, 3, 4, 5, 3, 1 \rangle\$ is not ...
3
votes
0
answers
2k
views
Brute force shortest path in Java
I had to ask myself a couple years ago: before Edsger Dijkstra invented his famous shortest path algorithm, how brute force approach would seem.
Below is my version. It's super slow, but I find it ...