Reddit Interview Question

breadth first search and depth first search