|
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
|