Thread: Trees and Nodes
View Single Post
Old 11-26-2004, 12:45 AM   #1 (permalink)
sitri
Registered User
 
Join Date: Nov 2004
Posts: 3
sitri is on a distinguished road
Trees and Nodes

For educational purposes I'm coding a simple forum, I've got the login/register, add message, view message, reply etc all figured out. What I'm having problems with is the threading of messages.

eg.

RootMessage
...Reply-1
...Reply-2
......Reply-2.1
...Reply-3
......Reply-3.1
.........Reply-3.1.1
(...)
...Reply-n


One possible solution I thought of is to use a Tree sort type algorithm - which is where I seem to be getting stuck.

Does anyone know how to do this or point me in the right direction so that I can work it out for myself.

TIA

Pual
sitri is offline   Reply With Quote