edited by
703 views

1 Answer

0 votes
0 votes
First option is wrong because it is not true every time that pre-order resembles the dfs of tree.. We can have case that dfs results different traversal and pre-order result is different at instance..

As we know considering the particular node in pre-order we have to get left child first and then right child however in dfs we can go on either of the sides.. So from the above options only last one seems valid every time..

Related questions

1 votes
1 votes
1 answer
1
Kuldeep Pal asked Jul 16, 2017
361 views
0 votes
0 votes
1 answer
2
Durgesh Singh asked Apr 29, 2018
273 views
How can we distinguish b/w back edge, the forward edge and cross edge in BFS or DFS traversal in Graphs?