Actually use stacks and queues in DFS/BFS