Thread: ABt Binary Search Trees

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    12
    use an array
    Code:
    int random_integer[15]
    	for(int index=0; index<14; index++) {
    		random_integer[i] = (rand()%100)+1;
    		cout << random_integer[i] << endl;
    	}
    	for(int index=14; index>0; index--) {// check through in reverse order
    		cout << random_integer[i] << endl;
    	}
    they are the only ways you can transverse through the list(?), though you can point to a specific array element by using random_interger[5] or whatever number element you want to look at.

    also this isn't a binary search tree that you are asking for, however you have written "this will be the input for your search tree" so I assume that you already have a separate search tree?. http://en.wikipedia.org/wiki/Binary_search_tree
    Last edited by robolee; 10-17-2009 at 08:39 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary Search Trees
    By lorannex in forum C Programming
    Replies: 3
    Last Post: 04-25-2009, 06:24 AM
  2. Performance issue!
    By maven in forum C Programming
    Replies: 42
    Last Post: 03-23-2009, 11:57 AM
  3. Ornery binary search algorithm
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 11-17-2001, 03:32 PM
  4. Newbie questions regarding binary search trees
    By Ham in forum C++ Programming
    Replies: 1
    Last Post: 11-04-2001, 07:48 AM