I appreciate the advice, I'm considering these interview practice 🙂
Would that not be more like a BFS though? I'm going to visit each neighbour before I visit any neighbours of neighbours right? Suppose you could insert into the stack instead. Not that it matters whether we use BFS/DFS in the problems we've had so far
I appreciate the advice, I'm considering these interview practice 🙂
Would that not be more like a BFS though? I'm going to visit each neighbour before I visit any neighbours of neighbours right? Suppose you could insert into the stack instead. Not that it matters whether we use BFS/DFS in the problems we've had so far