school/cs235/lab10/avl.h
2016-04-06 20:46:10 -07:00

26 lines
596 B
C++

#ifndef __AVL_H__
#define __AVL_H__
#include "AVLInterface.h"
#include "node.h"
#include <iostream>
class avl : public AVLInterface {
public:
avl();
~avl();
node* root;
bool h;
NodeInterface * getRootNode();
void deltree (node* root);
node* build(node* root, int data);
bool add(int data);
node* del_leaf(node* root, int data);
void display(node* root);
node* del(node* succ, node* n);
node* bal_left(node* root);
node* bal_right(node* root);
bool remove(int data);
};
#endif