// sl-4-DHBW-Inf2
#ifndef AVLBAUM_H
#define AVLBAUM_H

#include <cstdlib>
#include <iostream>
#include "suchbaum.h"

using namespace std;

enum avlBalance {unbalancedleft,balanced,unbalancedright};
struct avlTree;
typedef avlTree * avlPtr;
struct avlTree {
  DataType value;
  avlPtr left,right;
  avlBalance balance;
} ;

void avlInsert(avlPtr & root, const DataType value);
bool avlFind(const avlPtr root, const DataType value);
bool avlDelete(avlPtr & root, const DataType value);

void delTree(const avlPtr root);
bstPtr avl2bst(const avlPtr root);
bstPtr avlbal2bst(const avlPtr root);

void avlInsertFiboOfHeight(avlPtr & root, const int height);

#endif
