Graph data structures and depth first search implementation