explanation: Node : lock - that node is locked or not; lockedDesc - number of descendents locked of that node left, right,par as name sugest;
unLock(): when we unlock a node than all its ancestor has to decrease its lockedDesc value by 1. Lock(): when we lock a node than all its ancestor has to increase its lockedDesc value by 1. I hope now it should be clear. :) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.