Added breadth an depth first algorithms based on a given source.