in Programming in C edited by
692 views
3 votes
3 votes

in Programming in C edited by
692 views

4 Comments

Option A.

now see adjacent of a which are b and d we take choice as  b 

same procedure repeats...

so stack having a b c f g .... now here g having  only one choice d and d having a,b,e choices from which a,b already visited...so e....

when there is loop we have to pop and again check for adjacent of element that is in case of option C.

1
1
edited by
Only 1. and 3.

They are asking about Traversal.

In 3rd Option: c->e->d->g->f-> after that we will back to f->g->d and then d->b->a.

So 3 is also right.
1
1
Option 1 and 3 are DFS traversal
0
0

3 Answers

2 votes
2 votes
Best answer
i am getting option A and C are correct.

in C option after f  we will back to f->g->d and then d->b->a

therefore option C is right and remaining options B and D are incorrect because c can not occur just after d and d can not occur just after c respectively.
selected by
1 vote
1 vote
2) c cant occur just after d
4) d cant occur just after c
i think 1 nd 3 r correct
0 votes
0 votes

here is my solution

Related questions

1 vote
1 vote
0 answers
1
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true