[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


Q.1-: Write a program in 'c' programming language to list...

<< Back to: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)

Question by mukeshks_2003@yahoomail.com
Submitted on 10/10/2003
Related FAQ: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)
Rating: Rate this question: Vote
Q.1-: Write a program in 'c' programming language to list the node of a binary tree in the following way:

list the root, then nodes at depth 1, followed by nodes at depth 2, and so on.
your program should have liner time complexity.

Q.2-: Let G=(V,E) be an undirected graph. Use depth-first search to develop a program using 'C' language to covert each edge in G to a directed edge such that the resulting graph is strongly connected, or determine that this is not possible.


Answer by computerboy
Submitted on 10/27/2003
Rating:  Rate this answer: Vote
That is pretty darn useless a thing to do.

 

Answer by WarKosign
Submitted on 11/20/2003
Rating:  Rate this answer: Vote
You should use a queue. First, enqueue the tree root.
Then, while queue is not empty - visit the current leaf, and enqueue both his sons.

This way, you will move on to the level 3 leaves only after treating all level 2 leaves, and so on.

 

Answer by Mir Sajjad Hussain Talpur
Submitted on 4/10/2004
Rating: Not yet rated Rate this answer: Vote
in this program first of all we can mention two global variable who's name is edge & radious

 

Answer by jay
Submitted on 4/16/2004
Rating: Not yet rated Rate this answer: Vote
nothing

 

Answer by ram
Submitted on 11/7/2004
Rating: Not yet rated Rate this answer: Vote
write a program to determine the connectedness of a given simple graph

 

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.