Newbie questions regarding binary search trees

This is a discussion on Newbie questions regarding binary search trees within the C++ Programming forums, part of the General Programming Boards category; I have a BST which takes in an arbitrary list of words, and outputs the occurrences of each word in ...

  1. #1
    Ham
    Ham is offline
    Registered User
    Join Date
    Sep 2001
    Posts
    14

    Newbie questions regarding binary search trees

    I have a BST which takes in an arbitrary list of words, and outputs the occurrences of each word in alphabetical order:

    1. What is the height of the tree given that the words are inserted in random order? (English text is not random)

    2. Best comparison-based sorting algorithms require O(nlogn) comparisons, n is the number of items being sorted, for their worst case input. Given that, how long does it take to insert m unique words into a B-tree?

  2. #2
    zen
    zen is offline
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    Is this homework? Here's a link that might help.
    zen

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary Search Trees
    By chaos in forum C Programming
    Replies: 1
    Last Post: 06-14-2005, 05:42 AM
  2. Search Engine - Binary Search Tree
    By Gecko2099 in forum C Programming
    Replies: 9
    Last Post: 04-17-2005, 02:56 PM
  3. Binary trees search problem...
    By Umoniel in forum C Programming
    Replies: 2
    Last Post: 02-22-2004, 01:29 PM
  4. binary search tree
    By unregistered in forum C++ Programming
    Replies: 4
    Last Post: 12-11-2001, 10:42 AM
  5. Ornery binary search algorithm
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 11-17-2001, 02:32 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21