While reading about DFS vs BFS, I came across a statement that DFS is faster than BFS, and requires less memory.
My implementation is in C++ for both, making a stack for DFS and queue for BFS. Can someone please explain what, and how are the speed and memory requirements different?