Results 1 to 2 of 2
  1. #1
    Malv is offline Member
    Join Date
    Jun 2013
    Posts
    62
    Rep Power
    0

    Default How do you find the average height of a Binary Search Tree?

    Hi guys,

    How do you really get the average height of a BST? is it getting different height and average it? how do u get different height?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,001
    Blog Entries
    7
    Rep Power
    20

    Default Re: How do you find the average height of a Binary Search Tree?

    Add the heights of all the leave nodes and divide the sum by the number of those leafs; a fine job for a recursive method.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Binary Tree Help - Find the largest sub-tree
    By joshhazel in forum New To Java
    Replies: 2
    Last Post: 01-30-2012, 02:08 AM
  2. Binary search tree ?
    By santa in forum New To Java
    Replies: 5
    Last Post: 06-07-2011, 03:22 PM
  3. Binary search tree
    By hansmoolman in forum New To Java
    Replies: 2
    Last Post: 10-28-2010, 01:59 PM
  4. Replies: 0
    Last Post: 04-04-2010, 07:40 AM
  5. Binary search tree search method
    By chopo1980 in forum New To Java
    Replies: 2
    Last Post: 12-10-2009, 01:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •