On May 2, 7:08 am, divya <sweetdivya....@gmail.com> wrote:
> u are given a sorted lnked list construct a balanced binary search
> tree from it.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to 
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/algogeeks?hl=en.

There is a simple iterative solution to this problem that obviously
runs in linear time.
I have implemented a version of it that builds a weighted binary tree.
I'll refrain from describing it here though because I suspect this is
someones homework.  :-)
I will give this clue though.  The tree is built bottom up, not top
down which is more difficult.

Regards,

Ralph Boland

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@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.

Reply via email to