What can be a best approach when we want all possible outcome ? ( DFS or BFS or any other technique)

I faced this situation so many time , so I want to make sure that will dfs or bfs is helpful or any other technique is helpful ? Please help me with technique or answer in DFS or BFS.
@ssjgz @everule1 @galencolin