What would be the Eytzinger method equations of a d-ary tree?

Viewed 13

If a binary tree the equations to find the index in the Eytzinger method are:

Child on the left is 2i + 1

Child on the right is 2i + 2

Father is (i-1)/2

What would be the equations for a D-ary Tree given an index i, determine the parent of i and each of the d children of i

0 Answers
Related