-
Avl tree help
can anyone implement these two functions ?
Code:
int avl_insert(avl_t * tree, avl_key_t key, data_t data)
data_t avl_remove (avl_t *tree, avl_key_t key)
giving this struct
typedef void * data_t;
typedef struct avl_node_tag{
data_t data_ptr;
avl_key_t key;
struct avl_node_tag * left;
struct avl_node_tag * right;
int height;
} avl_node_t;
typedef struct avl_tag{
avl_node_t * root;
int tree_size;
AVLComparator comparator;
int num_recent_key_comparisons;
} avl_t;
-
> can anyone implement these two functions ?
Yes, but that isn't the point of homework is it?
You "attempt", we "help".
Not "you dump assignment and go party" and we "spend hours getting you a good grade".
-
But what is an AVL tree doing in the AI section?
-