BRAC IT Services Interview Question

When should we use BFS and when DFS, explain with example