Reddit interview question

breadth first search and depth first search