random n-node random binary search tree

out to sea and need some help

Page 1 of 1

3 Replies - 4257 Views - Last Post: 27 July 2008 - 12:58 AM Rate Topic: -----

#1 donaldh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 22-April 08

random n-node random binary search tree

Post icon  Posted 27 July 2008 - 12:13 AM

template <Assignment 2.1 Comparable>
class BinarySearchTree
{
public:
BinarySearchTree( );
BinarySearchTree(const BinarySearchTree&rhs);
-BinarySearchTree( );

const Comparable & findmin( ) const;
const Comparable & findmax( ) const;
bool contains (const Comparable & l) const;
bool isEmpty( ) const;
void printTree ( );

void makeEmpty( );
void insert (const Comparable & l);
void remove (const Comparable & l);

const BinarySearchTree & operator=(const BinarySearchTree & rhs);

private
struct BinaryNode
{
Comparable element:
BinaryNode * left;
BinaryNode * right;

BinaryNode(const Comparable & theElement, BinaryNode * lt, BinaryNode * rt)
:element (theElement), left (lt), right (rt){}
};

BinaryNode *root;

void insert (const Comparable & l, BinaryNode *& N)const;
void remove(const Comparable & l,BinaryNode *&N)const;
BinaryNode *findMin(BinaryNode *N) const;
BinaryNode *findMax(BinaryNode *N) const;
bool contains (const Comparable & l,BinaryNode *N)const;
void MakeEmpty(BinaryNode *& N);
void printTree(BinaryNode *N)const;
BinaryNode * clone(BinaryNode *N)const;
};




I can not download a compiler because i am out to sea on a navy ship. Taking an online course
i hope this is right.......can someone help me!!1 forgot this is what i need to do. Write a random binary search
tree with distinct key l through N.

This post has been edited by donaldh: 27 July 2008 - 12:16 AM


Is This A Good Question/Topic? 0
  • +

Replies To: random n-node random binary search tree

#2 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5247
  • View blog
  • Posts: 27,069
  • Joined: 10-May 07

Re: random n-node random binary search tree

Posted 27 July 2008 - 12:16 AM

View Postdonaldh, on 27 Jul, 2008 - 03:13 AM, said:

I can not download a compiler because i am out to sea on a navy ship.

Then how are you accessing Dream In Code?

Also, what is the problem? You didn't post a question with this code.
Was This Post Helpful? 0
  • +
  • -

#3 donaldh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 22-April 08

Re: random n-node random binary search tree

Posted 27 July 2008 - 12:22 AM

We can go on the internet and check e-mail but the administrators has the
server set so that only the Information System Specialist are the only ones
that can download programs on the server and they have to be approved
to be ran on Navy computer systems.
Was This Post Helpful? 0
  • +
  • -

#4 Bench  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 855
  • View blog
  • Posts: 2,338
  • Joined: 20-August 07

Re: random n-node random binary search tree

Posted 27 July 2008 - 12:58 AM

I can't really see how you can expect to learn C++ without being able to compile your code, since its a truly essential part of programming in any language.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1