edited by
2,491 views
2 votes
2 votes

How many times 8 is pushed into stack ? a detail answer will be welcomed.

edited by

1 Answer

Best answer
5 votes
5 votes

Given graph according to adjacency list . Answer will be 3.

 Solution :

X means already visted  and Down arrow means need to check.

selected by

Related questions

3 votes
3 votes
1 answer
4
admin asked Mar 31, 2020
873 views
What data structures is used for depth first traversal of a graph?QueueStackListNone of the above