@Sharad question says give a way to store a tree in an array. for that any
way we need to parse the tree and store every element into an array.
On Tue, Jun 22, 2010 at 7:53 PM, sharad kumar wrote:
> but if tree is sparse then lot of space will be wasted
>
> --
> You received this message because
but if tree is sparse then lot of space will be wasted
--
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...@googl
if we store the Binary tree in array as
array[1] = x1
array[2] = x2
array[3] = x3
array[4] = x4
array[5]= x5
array[6]= x6
array[7]=x7
x1 is first node at level 0 root node
x2 is left node and x3 is right node of x1 at level 1
x4 is left node and x5 is right node of x2 at level 2 and x5 is left no
give efficient way to store a tree in an array such that its height
can be calculated with ease requirements
--
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