Function to perform DFS of a vertex 1. stores the DFS of the vertex 1 in vector p , 2. store the start index of DFS of every vertex 3. store the end index of DFS of every vertex
def Dfs ( ch , par ) : NEW_LINE INDENT global currentIdx NEW_LINE p [ currentIdx ] = ch NEW_LINE DEDENT