algorithm - Getting the Average Height of a Binary Search Tree -


i have come problem statement tree in form:

     4   2     6 1   3 5   7 

it said average height 1.4285715

based know, average height of tree sum of height of each node divided total number of nodes. getting different result. need hint on how value 1.4285715 computed.

use formula ans set root depth 0: (0 + 1 + 1 + 2 + 2 + 2 + 2) / 7 = 10 / 7 = 1.4285715.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -