You are not logged in. Please login at www.codechef.com to post your questions!

×

DFS implementation

 0 Does this implementation of DFS is correct or not .. and if not so could anyone correct it >:) this is the link of it. http://ideone.com/1sLMnw asked 22 Jun '15, 17:57 46●1●5 accept rate: 16%

 1 ok no problem with,also look at my implementation it may helpful. https://ideone.com/AGm2xe  answered 22 Jun '15, 19:39 4★pallesai 176●8●30 accept rate: 17%
 0 It looks correct to me (assuming the graph has only five nodes). You should look at the recursive implementation as well(if you haven't). It is shorter and more intuitive than using stack but also generally a tad bit slower. answered 22 Jun '15, 19:05 1.0k●6●11●22 accept rate: 16%
 toggle preview community wiki:
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• link:[text](http://url.com/ "title")
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×727

question asked: 22 Jun '15, 17:57

question was seen: 937 times

last updated: 24 Jun '15, 15:19