#ifndef RB_TREE_H_SENTRY #define RB_TREE_H_SENTRY enum color_type { red, black }; struct node_type { int key; enum color_type color; struct node_type *p; struct node_type *left; struct node_type *right; }; typedef struct node_type node; struct rb_tree_type { node *root; node *nil; }; typedef struct rb_tree_type rb_tree; void rb_tree_init(rb_tree *t); void rb_tree_insert_node(rb_tree *t, node *cur_node); void rb_tree_delete_node(rb_tree *t, node *cur_node); void rb_tree_clear(rb_tree *t, node *root); node *rb_tree_create_node(rb_tree *t, int num); node *rb_tree_search(rb_tree *t, node *root, int num); void rb_tree_print(rb_tree *t, node *root); #endif