[algogeeks] Re: tree from linked list

2010-05-17 Thread W Karas
Oops, build() is a member of base_avl_tree, not the iter member class. On May 14, 5:23 pm, W Karas wka...@yahoo.com wrote: See the definition of:     templatetypename fwd_iter     bool build(fwd_iter p, size num_nodes) Within the iter subclass, within the base_avl_tree template in:

[algogeeks] Re: tree from linked list

2010-05-16 Thread Ralph Boland
On May 14, 9:46 pm, Yalla Sridhar sridhar2...@gmail.com wrote: @atul linked list can be converted to array with O(n) both space @ time overhead. then tree can be built in O(n) This is true but is not the simplest solution. As pointed out earlier by me and also Divya Jain the best solution is

Re: [algogeeks] Re: tree from linked list

2010-05-15 Thread Yalla Sridhar
@atul linked list can be converted to array with O(n) both space @ time overhead. then tree can be built in O(n) On Sat, May 15, 2010 at 2:53 AM, W Karas wka...@yahoo.com wrote: See the definition of: templatetypename fwd_iter bool build(fwd_iter p, size num_nodes) Within the iter

[algogeeks] Re: tree from linked list

2010-05-14 Thread W Karas
See the definition of: templatetypename fwd_iter bool build(fwd_iter p, size num_nodes) Within the iter subclass, within the base_avl_tree template in: http://wkaras.webs.com/gen_cpp/avl_tree_h.txt On May 2, 9:08 am, divya sweetdivya@gmail.com wrote: u are given a sorted lnked

[algogeeks] Re: tree from linked list

2010-05-13 Thread Atul Kumar
array and linked list are not the same so all solutions based on array are wrong. think this way : how to print(or append in a linked list) the binary search tree in the sorted order -- the answer is in-order traversal. you need to do opposite of it here. On May 12, 10:17 am, divya jain

[algogeeks] Re: tree from linked list

2010-05-07 Thread Ralph Boland
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