[algogeeks] Re: Lock A Node In A Tree...

2006-07-02 Thread mg
This idea sems to be fastest what u can do ..as i know. Then u need to have 2 booleans. CanItBeLocked: true/false ActualStatus: locked/unlocked. So whenever you want to query a node u simply check CanItBeLocked. But when u actually want to lock/unlock it. then you need to do a status (CanItBeLo

[algogeeks] Re: Lock A Node In A Tree...

2006-07-01 Thread Kapil
I think the better idea is that we associate a boolean variable with each node telling abt lock. lock instance will be true if its right child has lock true its left child has lock true. * lock true means the node can be locked... even if the idea does not works for you please tell what yo