CoolInterview.com - World's Largest Collection of Interview Questions
Start Your Own website Now
Sponsored Links

Interview Questions
Our Services

Get 9,000 Interview Questions & Answers in an eBook.


  • 9500+ Pages
  • 9000 Question & Answers
  • All Tech. Categories
  • 14 MB Content

    Get it now !!



    Send your Resume to 6000 Companies


  • INTERVIEW QUESTIONS LANGUAGES C++ DETAILS
    Question :
    Write the psuedo code for the Depth first Search.


    Category C++ Interview Questions
    Rating (0.4) By 246 users
    Added on 7/16/2010
    Views 1438
    Rate it!
    Answers:

    dfs(G, v) //OUTLINE
    Mark v as "discovered"
    For each vertex w such that edge vw is in G:
    If w is undiscovered:
    dfs(G, w); that is, explore vw, visit w, explore from there as much as possible, and backtrack from w to v. Otherwise:
    "Check" vw without visiting w. Mark v as "finished".



    If you have the better answer, then send it to us. We will display your answer after the approval.
    Rules to Post Answers in CoolInterview.com:-

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

       
    Related Questions
    View Answer
    What are the advantages and disadvantages of B-star trees over Binary trees?

    View Answer
    Write a fucntion that will reverse a string.
    View Answer
    What is the difference between Stack and Queue?
    View Answer
    What are the differences between new and malloc?
    View Answer
    What is your reaction to this line of code?
    View Answer
    When should you use multiple inheritance?
    View Answer
    What are the debugging methods you use when came across a problem?
    View Answer
    How the compilers arranges the various sections in the executable image?
    View Answer
    What are the differences between a C++ struct and C++ class?
    View Answer
    How do you know that your class needs a virtual destructor?
    View Answer
    What is the difference between new/delete and malloc/free?
    View Answer
    What happens when a function throws an exception that was not specified by an exception specification for this function?
    View Answer
    Can you think of a situation where your program would crash without reaching the breakball, which you set at the beginning of main()?
    View Answer
    What issue do auto_ptr objects address?
    View Answer
    Is there any problem with the following:
    View Answer
    Why do C++ compilers need name mangling?
    View Answer
    Is there anything you can do in C++ that you cannot do in C?


    View Answer
    What is problem with Runtime type identification?
    View Answer
    What is Pure Virtual Function? Why and when it is used ?
    View Answer
    What about Virtual Destructor?
    View Answer


    Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.

    View ALL C++ Interview Questions

    User Options
    Sponsored Links


    Copyright ©2003-2014 CoolInterview.com, All Rights Reserved.
    Privacy Policy | Terms and Conditions

    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | C Interview Questions & Answers

    Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes


    Cache = 0 Seconds