The version of BFS and DFS of pseudo code based on wiki page