User Profile
Collapse
-
I forgot about it... Thank you again!... -
-
graph using adjacency list - problem
Here's my code that's supposed to be a basic graph implementation using adjacency lists. It comes straight from R.Sedgewick's "Algorithms in C++".
However "23 - ISO C++ forbids declaration of `vector' with no type ". Why is that?
...Code:class graf { struct edge { int v, w; edge(int v = -1, int w = -1) : v(v), w(w) {} }; -
Multiset with custom < operator - problem with iterators
Hi everyone!
I have a following problem:
...Code:#include<iostream> #include<set> using namespace std; struct punkt { int x; int y; }; struct porownaj_x { bool operator() (const punkt& lhs, const punkt& rhs) const {return lhs.x<rhs.x;} }; struct porownaj_y -
A flooding/echo algorithm in graphs/trees
He everyone!
My question is quite simple: is there an algorithm that does exactly what's shown on this picture:
I thought about using BFS or IDDFS that "backtrack" after reaching all the leaves of the graph. Is there a better way to compute this algorithm?...
No activity results to display
Show More
Leave a comment: