How to differentiate a problem DFS vs BFS

I solved a handful of problems on leetcode, sometimes DFS and in some cases BFS(queue) by intution. But it is still a mystery for me when am I supposed to use DFS vs BFS. Could someone please guide me how to tackle this confusion. I often see in discussions where people post their solutions tagging BFS/DFS wrongly (maybe I'm wrong).
Thank you :)

Comments (1)