Implementation of an adjacency list and some common graph algorithms in C++