I think the following algo should work: 1. Create a DLL of the inorder traversal of the tree 2. for each node, check whether P of that node points to the previous node in the DLL or not. 3. If not, assign it value NULL
-- Tushar Bindal Computer Engineering Delhi College of Engineering Mob: +919818442705 E-Mail : [email protected], [email protected] -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
