Hi ..
This is killing me:
You are given a tree with N vertexes. Write a program, that adds (if possible) a minimum number of edges so that each vertex becomes a part of not more than ONE cycle.
Sample input:
n=7
1 2
1 3
3 5
3 4
5 6
5 7
sample output:
6 7
4 2
can you give me at least some basic hints. i need to do this one till monday otherwise i'm dead.
[/i]
problem with a tree that for you should be easy
Moderator: Board moderators
problem with a tree that for you should be easy
When people agree with me I always feel that I must be wrong.