user2555240 user2555240 - 1 year ago 91
C++ Question

Pseudocode for BFS(from The Algorithm Design, 2nd Ed.) confusion?

I need help with BFS pseudocode from The Algorithm Design Manual 2nd Edition, Skiena.

Line that says

process vertex u as desired

and same thing but with edge(s)
process edge (u, v) as desired

How should I write these lines in C++?

Answer Source

This depends on what you try to achieve with the algorithm. Those locations are the place where you put code which actually does something application specific.

If you're writing just a test-implementation you can insert console outputs there to see in which order the vertices/edges are processed

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download