Skip to main content

All Questions

Filter by
Sorted by
Tagged with
8 votes
2 answers
9k views

C++ Graph Class Implementation (adjacency list)

I've got a barebones C++ graph class implemented as an adjacency list. The graph consists of a vector of vertices. Each vertex has a vector of outgoing edges that store the destination vertex id. ...
ruslank's user avatar
  • 145
5 votes
3 answers
22k views

Graph Creation and BFS + DFS in C#

I was asked to implement a graph and BFS and DFS. Please comment. Is it understandable? Is my algorithm correct? Are there any optimizations? ...
Gilad's user avatar
  • 5,253