menu
Login
Register
search
Log In
account_circle
Log In
Email or Username
Password
Remember
Log In
Register
I forgot my password
Register
Username
Email
Password
Register
add
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
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
Recent Posts
JEST 2021 registrations are open
TIFR GS-2021 Online Application portal
IIT Jodhpur Mtech AI - Interview Expierence (Summer Admission)
Interview experience at IIT Tirupati for MS program winter admission
IITH CSE interview M Tech RA Winter admission 2021
Subjects
All categories
General Aptitude
(2.1k)
Engineering Mathematics
(8.5k)
Digital Logic
(3k)
Programming and DS
(5.1k)
Algorithms
(4.5k)
Theory of Computation
(6.3k)
Compiler Design
(2.2k)
Operating System
(4.7k)
Databases
(4.3k)
CO and Architecture
(3.5k)
Computer Networks
(4.3k)
Non GATE
(1.2k)
Others
(1.3k)
Admissions
(595)
Exam Queries
(838)
Tier 1 Placement Questions
(16)
Job Queries
(71)
Projects
(19)
Unknown Category
(1.1k)
Recent Blog Comments
B.Tech students are eligible only for Integrated...
I tried calling IISC Admission Dept, but they...
Mock 2 are live now.
sir ,it's already 17th
It will be live soon.
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
DFS- Depth First Search
1
vote
262
views
dfs
algorithms
graph-algorithms
data-structures
asked
Dec 3, 2017
in
Algorithms
Shubham Kumar Gupta
262
views
answer
comment
1
c should be answer
0
can you explain?
0
Can you please explain..
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
2
votes
V6(3,8)
V3(1,7)
V7(8)
V8(4,5)
V5(2)
V2(1,4)
V4()
V1()
because it is DFS use the stack. in bracket i have put the node adjacent to the vertex.
answered
Dec 3, 2017
Red_devil
comment
0
I think there is something wrong with this solution Plz Cross check.. Because initially while accessing 6 you have inserted 3 and 8 it means they are visited according to algorithm.. You cannot again push 8 while accessing 7 even you can't pop 8 until the above elements are not popped
Please
log in
or
register
to add a comment.
← Prev.
Next →
← Prev. Qn. in Sub.
Next Qn. in Sub. →
Related questions
4
votes
1
answer
1
225
views
DFS- depth first search
asked
Jan 25, 2018
in
DS
budhu
225
views
data-structures
dfs
graph-algorithms
graph-connectivity
0
votes
0
answers
2
223
views
Depth First Search (DFS)
Consider the following sequence of nodes for the undirected graph given below$:$ $(1)PQSTWVUR$ $(2)PQRSTUWV$ $(3)PQRTUSVW$ A Depth First Search (DFS) is started at node $P.$The nodes are listed in the order they are first visited. Which all of the above are possible outputs$?$ $A)Only (2)$ $B)(1) and (2)$ $C)(2) and (3)$ $D)(1) and (2)$
Consider the following sequence of nodes for the undirected graph given below$:$ $(1)PQSTWVUR$ $(2)PQRSTUWV$ $(3)PQRTUSVW$ A Depth First Search (DFS) is started at node $P.$The nodes are listed in the order they are first visited. Which all of the above are possible outputs$?$ $A)Only (2)$ $B)(1) and (2)$ $C)(2) and (3)$ $D)(1) and (2)$
asked
Nov 13, 2018
in
Algorithms
Lakshman Patel RJIT
223
views
algorithms
graph-algorithms
dfs
1
vote
1
answer
3
114
views
Depth First Search: Finding if The graph is connected
Better Explanation??
Better Explanation??
asked
Dec 8, 2018
in
DS
pradeepchaudhary
114
views
data-structures
dfs
graph-algorithms
0
votes
0
answers
4
337
views
Depth First Search
asked
Nov 7, 2018
in
Programming
Na462
337
views
dfs
data-structures
graph-algorithms
...