0. Root index is 0.

      a[0]
a[1] a[2]
a[3]a[4] a[5]a[6]
lower index : 2*i+1 and 2*i+2
upper index : (i-1)/2
length : (1<<depth)-1


1. Root index is 1.

      a[1]                        a[0]
a[2] a[3]
a[4]a[5] a[6]a[7]

lower index : 2*i and 2*i+1
upper index : i/2
length : 1<<depth