Highlight Graph Elements on BFS and DFS Trees

Here, graph elements are highlighted on BFS (breadth-first scan) and DFS (depth-first scan) trees.

    
In[1]:=
Click for copyable input
Perform breadth-first scan at 10:
In[2]:=
Click for copyable input
Out[2]=
Perform depth-first scan at 10:
In[3]:=
Click for copyable input
Out[3]=
Highlight BFS and DFS trees:
In[4]:=
Click for copyable input
Out[4]=