powered by
One starts at the root and explores as far as possible along each branch before backtracking.
dfs(s,visited,adj)
The root node.
N by 1 vector, where N is the number of nodes. This vector records whether nodes have been visited or not with 1 if visited and 0 otherwise.
N by N adjacent matrix.
getGraph