union find

C

carmelo

hy guys, i'm trying to implement union-find operations with a forest,
each node has a pointer to its parent.. the classic implementation
that all books says it's better.. (f.e. http://en.wikipedia.org/wiki/Union_find
) i have a problem.. sometimes i need to split the structures made
with the unions and i need to count my unions.. anyione has an idea?
 
M

Mark Bluemel

carmelo said:
hy guys, i'm trying to implement union-find operations with a forest,
each node has a pointer to its parent.. the classic implementation
that all books says it's better.. (f.e. http://en.wikipedia.org/wiki/Union_find
) i have a problem.. sometimes i need to split the structures made
with the unions and i need to count my unions.. anyione has an idea?
This is an algorithm question not a language-related question.

Asking somewhere like comp.programming may be more useful than posting here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top