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

python - cx_oracle unable to find Oracle Client -

shader - OpenGL Shadow Map -

c# - Exchange 2010/2013 TransportAgent Content Conversion for Internal Recipients -