Thread: Newbie questions regarding binary search trees

  1. #1
    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
    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, 02:29 PM
  4. binary search tree
    By unregistered in forum C++ Programming
    Replies: 4
    Last Post: 12-11-2001, 11:42 AM
  5. Ornery binary search algorithm
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 11-17-2001, 03:32 PM