g=PetersenGraph[5,4];

bfs=BreadthFirstScan[g,10]

dfs=DepthFirstScan[g,10]

Row[{HighlightGraph[g,{TreeGraph[VertexList[g],bfs]},VertexSize->{10->0.2}],Spacer[20],HighlightGraph[g,TreeGraph[VertexList[g],dfs],VertexSize->{10->0.2}]}]