Algorithms: Add edges() function to Graph