On Dec 18, 4:34 am, Mr.SpOOn wrote:
> 2008/12/17 Terry Reedy :
>
> > Nodes only have single number indexes if you arrange them linearly. Then the
> > index depends on how you arrange them, whether you start the array indexes
> > with 0 or 1, and whether you start the level numbers with 0 or 1. Ca
2008/12/17 Terry Reedy :
> Nodes only have single number indexes if you arrange them linearly. Then the
> index depends on how you arrange them, whether you start the array indexes
> with 0 or 1, and whether you start the level numbers with 0 or 1. Call the
> breadth-first sequence bf. Then the 1
Mr.SpOOn wrote:
Hi,
I'm searching for a clear explanation of binary tree properties,
expecially the ones related to logarithms.
For example, I know that in a tree with 2n-1 nodes, we have log(n)
levels, from 0 to log(n).
A *complete* binary tree with n levels has 2**n - 1 nodes. This is
easi
Hi,
I'm searching for a clear explanation of binary tree properties,
expecially the ones related to logarithms.
For example, I know that in a tree with 2n-1 nodes, we have log(n)
levels, from 0 to log(n).
So, if k is the level, the nodes on a level have indexes between 2^k
and 2^(k+1)-1.
For k=0