recurrence relation for binary tree height algorithm?
Posted on 1998-11-10
what would the recurrence relation be for the following pseudo code algorithm?
if (T is not empty)
lefttreeht = Height(left subtree of T);
righttreeht = Height(right subtree of T);
if (lefttreeht > righttreeht)
return lefttreeht + 1;
return righttreeht + 1;