26 lines
596 B
C++
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
|