First version of MyGraph, breadth-first search and depth-first search