adding cs235

This commit is contained in:
dm
2016-04-06 20:46:10 -07:00
parent 8e52ce1982
commit cf99ec6565
178 changed files with 13079 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
//YOU MAY NOT MODIFY THIS DOCUMENT
#pragma once
#include "NodeInterface.h"
using namespace std;
class BSTInterface {
public:
BSTInterface() {}
virtual ~BSTInterface() {}
//Please note that the class that implements this interface must be made
//of objects which implement the NodeInterface
/*
* Returns the root node for this tree
*
* @return the root node for this tree.
*/
virtual NodeInterface * getRootNode() = 0;
/*
* Attempts to add the given int to the BST tree
*
* @return true if added
* @return false if unsuccessful (i.e. the int is already in tree)
*/
virtual bool add(int data) = 0;
/*
* Attempts to remove the given int from the BST tree
*
* @return true if successfully removed
* @return false if remove is unsuccessful(i.e. the int is not in the tree)
*/
virtual bool remove(int data) = 0;
};