I think that the soln to the same would be something like : say the length of the linked list be n. then height = no. of bits in n + ( no . of ones that are there in the binary representation of n) -1
kindly confirm if the above can be an answer. thanks in advance. On Dec 18, 11:48 am, richa <[email protected]> wrote: > . 10 > 6 12 > > 4-> 5 <-------->11<-----> 13 <-- > |_______________________| > (I have tried my best!) > Ok.. In the BST you have the leaf nodes connected to form a doubly LL. > Given a node, identify its height -- 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.
