Skip to main content

Timeline for Graph data structure implementation

Current License: CC BY-SA 3.0

8 events
when toggle format what by license comment
May 11, 2015 at 2:44 comment added rcanepa A little detail: I believe that is better to use #include <cstdio> instead of #include <stdio.h>. It makes explicit that your using things from the C library. For more information, see here gcc.gnu.org/onlinedocs/gcc-4.9.0/libstdc++/api/a01092.html and here gcc.gnu.org/onlinedocs/gcc-4.9.0/libstdc++/api/….
May 11, 2015 at 2:19 comment added Yuushi @Aadesh Yeah, back returns a reference, my mistake. I've fixed that up
May 11, 2015 at 2:18 history edited Yuushi CC BY-SA 3.0
deleted 1 character in body
May 11, 2015 at 0:06 comment added Aadesh Btw this piece of code doesn't work: template <typename T> Vertex& Graph<T>::addVertex(const T& data) { vertices.push_back(Vertex<T>(data, counter++)); return *vertices.back(); } it says that vertices.back() isn't even a pointer so you can't dereference it
May 9, 2015 at 4:57 comment added Yuushi @Aadesh Basically swapping a queue for a stack will do DFS.
May 9, 2015 at 4:06 comment added Aadesh Also I was wondering, how would you do DFS with your implementation of a graph with an array of neighbors.
May 9, 2015 at 2:58 vote accept Aadesh
May 8, 2015 at 17:56 history answered Yuushi CC BY-SA 3.0