SAP interview question

Explain breadth first search and depth first search with an example