Ritaj Logo
Rana Abu-Mazen Calendar | المناصب الإدارية للعام 2009/2010 | مكتبة الجامعة | لوحة الإعلانات
Birzeit University Academic and Administrative Portal Current Date: December 16,2009 14:57, Last Login Date: December 16,2009 13:57 - LOGOUT  

From: Diab Abu Aiadah Category: ENCS331
To: Section 1/LC; Section 2/LC;
Publish Date: 2009-09-16
To find the hieght of a tree.


Here is the exact function; Easy to convert to C.

=====

int height( BinaryTree Node t) {

if t is a null tree

return -1;

hl = height( left subtree of t);

hr = height( right subtree of t);

h = 1 + maximum of hl and hr;

return h;

}

==============


Contact usmailto:help%40ritaj.ps
   (also on MSN and Google Chat)
Or Call: +97(0/2)-2-2982012
Copyright©, Birzeit University 2002-2009 Recommended Browser: Mozilla Firefox
Screen Resolution: 1024 x 768